소스 검색

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

Nathalie Furmento 13 년 전
부모
커밋
76241e1182
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  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