Commit 22079d40 authored by Yannick Ulrich's avatar Yannick Ulrich

Decide what tests to do based on the argument

parent 11b1dc04
......@@ -17,7 +17,7 @@ PROGRAM TEST
character(len=32) :: arg
i = 0
i = 1
do
call get_command_argument(i, arg)
if (len_trim(arg) == 0) exit
......@@ -32,6 +32,49 @@ PROGRAM TEST
#else
call errprint("-verb not available, compile with --debug")
#endif
case('-mpl-test')
tol = zero * 1.e5_prec
call do_MPL_tests
case('-gpl-test')
tol = zero * 1.e5_prec
call do_GPL_tests
case('-chen-test')
tol = 8.0e-7
tests_successful = tests_successful .and. do_chen_test()
#ifdef HAVE_GINAC
#ifdef HAVE_MM
case('-ginac-tests')
tol = 8.0e-7
call do_ginac_tests
case ('-speed-tests')
i=i+1
call get_command_argument(i,arg)
read(arg,*) verb
call do_timing_tests(i)
case ('-hw-tests')
tol = 8.0e-7
call do_high_weight_tests
case ('-long-test')
tol = 8.0e-7
call do_long_test
#endif
#endif
case ('-report')
#ifdef DEBUG
verb = 1000
#endif
tol = zero * 1.e5_prec
call do_MPL_tests
call do_GPL_tests
tol = 8.0e-7
tests_successful = tests_successful .and. do_chen_test()
#ifdef HAVE_GINAC
#ifdef HAVE_MM
call do_ginac_tests
#endif
#endif
case default
call errprint("Unknown argument "//trim(arg))
......@@ -39,25 +82,8 @@ PROGRAM TEST
i = i+1
end do
tol = zero * 1.e5_prec
call do_MPL_tests()
call do_GPL_tests()
! call do_shuffle_tests() ! put this somewhere else
tol = 8.0e-7
tests_successful = tests_successful .and. do_chen_test()
#ifdef HAVE_GINAC
#ifdef HAVE_MM
call do_ginac_tests
#ifndef NOSPEED
call do_timing_tests(5)
call do_high_weight_tests
#endif
#ifdef LONG_TEST
call do_long_test
#endif
#endif
#endif
if(tests_successful) then
print*, 'All tests passed. '
......@@ -707,7 +733,6 @@ CONTAINS
end subroutine
#endif
#ifdef LONG_TEST
SUBROUTINE DO_LONG_TEST
#if KINDREAL==16
......@@ -791,7 +816,6 @@ CONTAINS
END SUBROUTINE
#endif
FUNCTION RAN2(randy)
! This is the usual "random"
......
......@@ -126,7 +126,6 @@ for arg in "$@" ; do
COVERAGE=true ;;
--ci)
echo "Running in CI configuration. Will not perform speed tests!"
CONF_FFLAGS="$CONF_FLAGS -DNOSPEED"
HAVE_MCC=true
HAVE_GINAC=true
DEBUG=true
......@@ -845,16 +844,37 @@ fi
cat >> makefile <<EOF
check: test
./$<
check-mpl: test
./$< -mpl-test
check-gpl: test
./$< -gpl-test
check-chen: test
./$< -chen-test
EOF
$HAVE_GINAC && $HAVE_MCC && cat >> makefile <<EOF
check-ginac: test
./$< -ginac-tests
check-speed: test
./$< -speed-tests 5
check-hw: test
./$< -hw-tests
check-long: test
./$< -long-test
EOF
($HAVE_GINAC && $HAVE_MCC) && echo "check: check-mpl check-gpl check-chen check-ginac" >> makefile \
|| echo "check: check-mpl check-gpl check-chen" >> makefile
if $COVERAGE ; then
cat >> makefile <<EOF
report/report.txt: test
mkdir -p report
./test -verb 1000 > /dev/null
./test -report > /dev/null
echo "Report generated on \`date\` by `whoami`." > \$@
EOF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment