Browse Source

tests: when running on valgrind, always return 0

Nathalie Furmento 13 years ago
parent
commit
60acf944bf
3 changed files with 7 additions and 2 deletions
  1. 1 1
      tests/core/deprecated_buffer.c
  2. 1 1
      tests/core/deprecated_func.c
  3. 5 0
      tests/helper.h

+ 1 - 1
tests/core/deprecated_buffer.c

@@ -162,5 +162,5 @@ int main(int argc, char **argv)
 
 	starpu_shutdown();
 
-	return ret;
+	STARPU_RETURN(ret);
 }

+ 1 - 1
tests/core/deprecated_func.c

@@ -144,5 +144,5 @@ int main(int argc, char **argv)
 
 	starpu_shutdown();
 
-	return ret;
+	STARPU_RETURN(ret);
 }

+ 5 - 0
tests/helper.h

@@ -49,3 +49,8 @@
 #  define STARPU_SKIP_IF_VALGRIND
 #endif
 
+#ifdef STARPU_HAVE_VALGRIND_H
+#  define STARPU_RETURN(ret) do { if(RUNNING_ON_VALGRIND) return 0; else return ret; } while(0)
+#else
+#  define STARPU_RETURN(ret) return ret
+#endif