[gegl] tests: Make skipped tests return SKIP



commit fa1e24b588f5df7514faa6efd0521c514c840407
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Wed Oct 16 18:29:44 2013 -0700

    tests: Make skipped tests return SKIP

 tests/simple/test-exp-combine.sh  |    2 +-
 tests/simple/test-opencl-colors.c |    7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/tests/simple/test-exp-combine.sh b/tests/simple/test-exp-combine.sh
index 1e239f3..8adff61 100755
--- a/tests/simple/test-exp-combine.sh
+++ b/tests/simple/test-exp-combine.sh
@@ -6,7 +6,7 @@ abs_top_builddir=$ABS_TOP_BUILDDIR
 
 if [ ! -f $abs_top_builddir/tools/exp_combine ]; then
   echo "Skipping test-exp-combine due to lack of exp_combine executable"
-  failure=0
+  exit 77
 else
   $abs_top_builddir/tools/exp_combine                              \
           $abs_top_builddir/tests/simple/test-exp-combine.hdr      \
diff --git a/tests/simple/test-opencl-colors.c b/tests/simple/test-opencl-colors.c
index 279afc5..a440229 100644
--- a/tests/simple/test-opencl-colors.c
+++ b/tests/simple/test-opencl-colors.c
@@ -24,6 +24,7 @@
 
 #define SUCCESS  0
 #define FAILURE -1
+#define SKIP     77
 
 static gboolean
 test_opencl_conversion (const char *in_format_name,
@@ -70,7 +71,11 @@ int main(int argc, char *argv[])
   gegl_init (&argc, &argv);
 
   if (!gegl_cl_is_accelerated())
-    printf ("OpenCL disabled: SKIP");
+    {
+      printf ("OpenCL disabled, skipping tests\n");
+      gegl_exit ();
+      return SKIP;
+    }
   else
     {
       RUN_TEST ("RGBA float", "RGBA float", GEGL_CL_COLOR_EQUAL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]