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
|
|
|
#===============================================================================
|
2022-03-11 12:33:27 +01:00
|
|
|
cd /opt/cp2k
|
2018-11-08 13:56:15 +01:00
|
|
|
|
2021-04-09 14:17:21 +02:00
|
|
|
echo "Using $(python3 --version) and $(mypy --version)."
|
|
|
|
|
echo ""
|
2018-04-08 16:07:05 +00:00
|
|
|
|
2022-02-19 14:35:21 +01:00
|
|
|
# prepare inputs for minimax_to_fortran_source.py
|
|
|
|
|
unzip -q -d ./tools/minimax_tools/1_xData 1_xData.zip
|
|
|
|
|
|
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
|
2022-01-30 00:26:23 +01:00
|
|
|
run_test ./tools/docker/generate_dockerfiles.py --check
|
2021-11-10 22:10:06 +01:00
|
|
|
|
|
|
|
|
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
|
2022-03-02 23:31:01 +01:00
|
|
|
run_test mypy --strict ./tools/dashboard/generate_regtest_survey.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
|
2022-02-06 14:13:52 +01:00
|
|
|
run_test mypy --strict ./tools/precommit/format_makefile.py
|
2022-01-30 00:26:23 +01:00
|
|
|
run_test mypy --strict ./tools/docker/generate_dockerfiles.py
|
2018-04-08 16:07:05 +00:00
|
|
|
|
2022-02-19 14:35:21 +01:00
|
|
|
# TODO: Find a way to test generate_dashboard.py without git repository.
|
|
|
|
|
#
|
|
|
|
|
# # 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
|