Browse Source

tests/core/starpu_init.c: skip test if unsetenv is unavailable

Nathalie Furmento 13 years ago
parent
commit
76241e1182
1 changed files with 10 additions and 0 deletions
  1. 10 0
      tests/core/starpu_init.c

+ 10 - 0
tests/core/starpu_init.c

@@ -18,6 +18,15 @@
 #include "../helper.h"
 #include <stdlib.h>
 
+#if !(defined(_BSD_SOURCE) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)
+#warning unsetenv is not defined. Skipping test
+int main(int argc, char **argv)
+{
+	return STARPU_TEST_SKIPPED;
+}
+#else
+
+
 static int check_cpu(int env_cpu, int conf_cpu, int expected_cpu, int *cpu)
 {
 	int ret;
@@ -87,3 +96,4 @@ int main(int argc, char **argv)
 	return ret;
 }
 
+ #endif