[gdk-pixbuf] tests: Move failing images into seperate directory
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] tests: Move failing images into seperate directory
- Date: Tue, 13 Oct 2015 01:02:49 +0000 (UTC)
commit 3acd3ec153808e36e052325e61533f6be7eb534c
Author: Benjamin Otte <otte redhat com>
Date: Mon Oct 12 14:04:00 2015 +0200
tests: Move failing images into seperate directory
tests/Makefile.am | 1 +
tests/pixbuf-randomly-modified.c | 20 ++++++++++++++------
.../{randomly-modified => fail}/invalid.1.bmp | Bin 6966 -> 6966 bytes
.../{randomly-modified => fail}/invalid.1.gif | 0
.../{randomly-modified => fail}/invalid.1.ico | Bin 318 -> 318 bytes
.../{randomly-modified => fail}/invalid.1.png | 0
.../{randomly-modified => fail}/invalid.1.ppm | 0
.../{randomly-modified => fail}/invalid.1.tga | Bin 23679 -> 23679 bytes
.../{randomly-modified => fail}/invalid.1.xpm | 0
.../{randomly-modified => fail}/invalid.2.gif | Bin 562 -> 562 bytes
.../{randomly-modified => fail}/invalid.2.ico | Bin 318 -> 318 bytes
.../{randomly-modified => fail}/invalid.2.png | Bin 2755 -> 2755 bytes
.../{randomly-modified => fail}/invalid.2.ppm | 0
.../{randomly-modified => fail}/invalid.3.gif | Bin 318 -> 318 bytes
.../{randomly-modified => fail}/invalid.3.ico | 0
.../{randomly-modified => fail}/invalid.3.png | Bin 64 -> 64 bytes
.../{randomly-modified => fail}/invalid.3.ppm | 0
.../{randomly-modified => fail}/invalid.4.gif | Bin 310 -> 310 bytes
.../{randomly-modified => fail}/invalid.4.png | 0
.../{randomly-modified => fail}/invalid.4.ppm | 0
.../{randomly-modified => fail}/invalid.5.ppm | 0
.../{randomly-modified => fail}/invalid.6.ppm | 0
.../{randomly-modified => fail}/invalid.7.ppm | 0
.../{randomly-modified => fail}/invalid.8.ppm | 0
24 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 833c73a..ed1c25c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -58,6 +58,7 @@ dist_installed_test_data = \
cve-2015-4491.bmp \
large.png \
large.jpg \
+ $(wildcard $(srcdir)/test-images/fail/*) \
$(wildcard $(srcdir)/test-images/randomly-modified/*) \
$(wildcard $(srcdir)/test-images/reftest/tga/*) \
$(NULL)
diff --git a/tests/pixbuf-randomly-modified.c b/tests/pixbuf-randomly-modified.c
index 2c905c3..427bed7 100644
--- a/tests/pixbuf-randomly-modified.c
+++ b/tests/pixbuf-randomly-modified.c
@@ -89,8 +89,8 @@ test_randomly_modified (gconstpointer data)
int
main (int argc, char **argv)
{
- gchar *test_images_dir;
- GFile *test_images;
+ gchar *base_dir;
+ GFile *base, *test_images;
#ifdef HAVE_SETRLIMIT
struct rlimit max_mem_size;
@@ -101,11 +101,19 @@ main (int argc, char **argv)
g_test_init (&argc, &argv, NULL);
- test_images_dir = g_build_filename (g_test_get_dir (G_TEST_DIST), "test-images/randomly-modified", NULL);
- test_images = g_file_new_for_path (test_images_dir);
- add_test_for_all_images ("/pixbuf/randomly-modified", test_images, test_images, test_randomly_modified,
NULL);
+ base_dir = g_build_filename (g_test_get_dir (G_TEST_DIST), "test-images", NULL);
+ base = g_file_new_for_path (base_dir);
+
+ test_images = g_file_get_child (base, "randomly-modified");
+ add_test_for_all_images ("/pixbuf", base, test_images, test_randomly_modified, NULL);
+ g_object_unref (test_images);
+
+ test_images = g_file_get_child (base, "fail");
+ add_test_for_all_images ("/pixbuf/randomly-modified", base, test_images, test_randomly_modified, NULL);
g_object_unref (test_images);
- g_free (test_images_dir);
+
+ g_object_unref (base);
+ g_free (base_dir);
g_test_message ("Modified image is written to pixbuf-randomly-modified-image");
diff --git a/tests/test-images/randomly-modified/invalid.1.gif b/tests/test-images/fail/invalid.1.gif
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.1.gif
rename to tests/test-images/fail/invalid.1.gif
diff --git a/tests/test-images/randomly-modified/invalid.1.png b/tests/test-images/fail/invalid.1.png
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.1.png
rename to tests/test-images/fail/invalid.1.png
diff --git a/tests/test-images/randomly-modified/invalid.1.ppm b/tests/test-images/fail/invalid.1.ppm
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.1.ppm
rename to tests/test-images/fail/invalid.1.ppm
diff --git a/tests/test-images/randomly-modified/invalid.1.xpm b/tests/test-images/fail/invalid.1.xpm
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.1.xpm
rename to tests/test-images/fail/invalid.1.xpm
diff --git a/tests/test-images/randomly-modified/invalid.2.ppm b/tests/test-images/fail/invalid.2.ppm
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.2.ppm
rename to tests/test-images/fail/invalid.2.ppm
diff --git a/tests/test-images/randomly-modified/invalid.3.ico b/tests/test-images/fail/invalid.3.ico
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.3.ico
rename to tests/test-images/fail/invalid.3.ico
diff --git a/tests/test-images/randomly-modified/invalid.3.ppm b/tests/test-images/fail/invalid.3.ppm
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.3.ppm
rename to tests/test-images/fail/invalid.3.ppm
diff --git a/tests/test-images/randomly-modified/invalid.4.png b/tests/test-images/fail/invalid.4.png
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.4.png
rename to tests/test-images/fail/invalid.4.png
diff --git a/tests/test-images/randomly-modified/invalid.4.ppm b/tests/test-images/fail/invalid.4.ppm
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.4.ppm
rename to tests/test-images/fail/invalid.4.ppm
diff --git a/tests/test-images/randomly-modified/invalid.5.ppm b/tests/test-images/fail/invalid.5.ppm
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.5.ppm
rename to tests/test-images/fail/invalid.5.ppm
diff --git a/tests/test-images/randomly-modified/invalid.6.ppm b/tests/test-images/fail/invalid.6.ppm
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.6.ppm
rename to tests/test-images/fail/invalid.6.ppm
diff --git a/tests/test-images/randomly-modified/invalid.7.ppm b/tests/test-images/fail/invalid.7.ppm
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.7.ppm
rename to tests/test-images/fail/invalid.7.ppm
diff --git a/tests/test-images/randomly-modified/invalid.8.ppm b/tests/test-images/fail/invalid.8.ppm
similarity index 100%
rename from tests/test-images/randomly-modified/invalid.8.ppm
rename to tests/test-images/fail/invalid.8.ppm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]