浏览代码

tests/datawizard/gpu_register.c: when no gpu is enabled, mark test as skipped

Nathalie Furmento 13 年之前
父节点
当前提交
040fdff2d2
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      tests/datawizard/gpu_register.c

+ 9 - 0
tests/datawizard/gpu_register.c

@@ -21,6 +21,13 @@
 #include "../helper.h"
 #include "scal.h"
 
+#if ! (defined(STARPU_USE_OPENCL) || defined(STARPU_USE_CUDA))
+int main(int argc, char **argv)
+{
+	return STARPU_TEST_SKIPPED;
+}
+#else
+
 static int
 submit_tasks(starpu_data_handle_t handle, int pieces, int n)
 {
@@ -292,3 +299,5 @@ fail:
 	starpu_shutdown();
 	return EXIT_FAILURE;
 }
+
+#endif /* defined(STARPU_USE_OPENCL) || defined(STARPU_USE_CUDA) */