mirror of
https://github.com/cosinekitty/astronomy.git
synced 2025-12-30 19:21:23 -05:00
The current Raspbian uses an older version of pylint that suffers from a recursion overflow. Hacked a deeper recursion limit to work around this issue. Also directly calling 'pylint' does not work in Raspbian. Instead of trying to figure out why, I just use 'python3 -m' to invoke pylint.
23 lines
768 B
Bash
Executable File
23 lines
768 B
Bash
Executable File
#!/bin/bash
|
|
Fail()
|
|
{
|
|
echo "ERROR($0): $1"
|
|
exit 1
|
|
}
|
|
|
|
[[ "$1" == "" || "$1" == "-v" ]] || Fail "Invalid command line options."
|
|
|
|
python3 --version || Fail "Cannot print python version"
|
|
python3 -m pylint --init-hook="import sys; sys.setrecursionlimit(2000)" ../source/python/astronomy.py || Fail "pylint detected problems"
|
|
python3 test.py $1 all || Fail "Failed Python unit tests."
|
|
for file in temp/py_longitude_*.txt; do
|
|
./generate $1 check ${file} || Fail "Failed verification of file ${file}"
|
|
done
|
|
|
|
echo "$0: Generating Python test output."
|
|
time python3 test.py astro_check > temp/py_check.txt || Fail "Failure in Python astro_check"
|
|
./generate $1 check temp/py_check.txt || Fail "Verification failure for Python unit test output."
|
|
|
|
echo "$0: PASS"
|
|
exit 0
|