Explorar o código

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

Cédric Augonnet %!s(int64=15) %!d(string=hai) anos
pai
achega
3e6aadaca8
Modificáronse 2 ficheiros con 6 adicións e 0 borrados
  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;
 }