Browse Source

tests/: on enodev errors, tests are marked as skipped

Nathalie Furmento 14 years ago
parent
commit
1e62c8c5c8
1 changed files with 9 additions and 0 deletions
  1. 9 0
      tests/datawizard/manual_reduction.c

+ 9 - 0
tests/datawizard/manual_reduction.c

@@ -187,9 +187,11 @@ int main(int argc, char **argv)
 		task->workerid = (unsigned)workerid;
 
 		int ret = starpu_task_submit(task);
+		if (ret == -ENODEV) goto enodev;
 		STARPU_ASSERT(!ret);
 	}
 
+
 	/* Perform the reduction of all per-worker handles into the variable_handle */
 	for (worker = 0; worker < nworkers; worker++)
 	{
@@ -203,6 +205,7 @@ int main(int argc, char **argv)
 		task->buffers[1].mode = STARPU_R;
 
 		int ret = starpu_task_submit(task);
+		if (ret == -ENODEV) goto enodev;
 		STARPU_ASSERT(!ret);
 	}
 
@@ -217,4 +220,10 @@ int main(int argc, char **argv)
 	starpu_shutdown();
 
 	return 0;
+
+enodev:
+	fprintf(stderr, "WARNING: No one can execute this task\n");
+	/* yes, we do not perform the computation but we did detect that no one
+ 	 * could perform the kernel, so this is not an error from StarPU */
+	return 77;
 }