2018-11-08 13:56:15 +01:00
|
|
|
#!/bin/bash -e
|
2018-04-22 08:32:48 +00:00
|
|
|
|
|
|
|
|
# author: Ole Schuett
|
|
|
|
|
|
2021-04-09 14:17:21 +02:00
|
|
|
function run_test {
|
|
|
|
|
TEST_COMMAND=("$@")
|
|
|
|
|
echo -en "Running \"${TEST_COMMAND[*]}\"... "
|
|
|
|
|
if "${TEST_COMMAND[@]}" &> test.out; then
|
|
|
|
|
echo "done."
|
|
|
|
|
else
|
|
|
|
|
echo -e "failed.\n\n"
|
|
|
|
|
tail -n 100 test.out
|
|
|
|
|
echo -e "\nSummary: Test \"${TEST_COMMAND[*]}\" failed."
|
|
|
|
|
echo -e "Status: FAILED\n"
|
|
|
|
|
exit 0
|
2021-02-17 17:02:43 +01:00
|
|
|
fi
|
2019-05-14 12:56:39 +02:00
|
|
|
}
|
|
|
|
|
|
2018-04-08 16:07:05 +00:00
|
|
|
#===============================================================================
|
2018-11-08 13:56:15 +01:00
|
|
|
cd /workspace/cp2k
|
|
|
|
|
|
2021-04-09 14:17:21 +02:00
|
|
|
echo "Using $(python3 --version) and $(mypy --version)."
|
|
|
|
|
echo ""
|
2018-04-08 16:07:05 +00:00
|
|
|
|
2021-04-09 14:17:21 +02:00
|
|
|
run_test ./tools/prettify/prettify_test.py
|
2021-11-10 22:10:06 +01:00
|
|
|
run_test ./tools/minimax_tools/minimax_to_fortran_source.py --check
|
|
|
|
|
|
|
|
|
|
run_test mypy --strict ./tools/minimax_tools/minimax_to_fortran_source.py
|
2021-04-09 14:17:21 +02:00
|
|
|
run_test mypy --strict ./tools/dashboard/generate_dashboard.py
|
2019-06-18 01:20:24 +02:00
|
|
|
run_test mypy --strict ./tools/regtesting/do_regtest.py
|
2021-06-03 23:40:05 +02:00
|
|
|
run_test mypy --strict ./tools/regtesting/optimize_test_dirs.py
|
2021-07-23 22:16:57 +02:00
|
|
|
run_test mypy --strict ./tools/precommit/check_file_properties.py
|
2018-04-08 16:07:05 +00:00
|
|
|
|
2021-04-09 14:17:21 +02:00
|
|
|
# Test generate_dashboard.py. Running it twice to also execute its caching.
|
|
|
|
|
mkdir -p /workspace/artifacts/dashboard
|
|
|
|
|
for _ in {1..2}; do
|
|
|
|
|
run_test ./tools/dashboard/generate_dashboard.py \
|
|
|
|
|
./tools/dashboard/dashboard.conf \
|
|
|
|
|
/workspace/artifacts/dashboard/status.pickle \
|
|
|
|
|
/workspace/artifacts/dashboard/
|
|
|
|
|
done
|
2019-05-14 12:56:39 +02:00
|
|
|
|
2018-04-08 16:07:05 +00:00
|
|
|
echo ""
|
2021-04-09 14:17:21 +02:00
|
|
|
echo "Summary: Python tests passed"
|
|
|
|
|
echo "Status: OK"
|
|
|
|
|
|
|
|
|
|
#EOF
|