Browse Source

The pi_redux example is now one of the tests used by make check

Cédric Augonnet 15 years ago
parent
commit
3e6aadaca8
2 changed files with 6 additions and 0 deletions
  1. 3 0
      examples/Makefile.am
  2. 3 0
      examples/pi/pi_redux.c

+ 3 - 0
examples/Makefile.am

@@ -286,6 +286,9 @@ ppm_downscaler_yuv_downscaler_SOURCES =		\
 # Pi #
 ######
 
+check_PROGRAMS +=				\
+	pi/pi_redux
+
 examplebin_PROGRAMS +=				\
 	pi/pi					\
 	pi/pi_redux

+ 3 - 0
examples/pi/pi_redux.c

@@ -273,5 +273,8 @@ int main(int argc, char **argv)
 
 	starpu_shutdown();
 
+	if (abs(pi_approx - PI) > 1.0)
+		return 1;
+
 	return 0;
 }