mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-27 13:45:19 -04:00
Move to Python3
This commit is contained in:
parent
99a5310d00
commit
8ba70f2a84
32 changed files with 62 additions and 280 deletions
|
|
@ -12,10 +12,6 @@ function run_tests {
|
|||
#find ./src/ ./tools/ -name "*.pyc" -exec rm {} \;
|
||||
for i in $SCRIPTS ; do
|
||||
set +e #disable error trapping
|
||||
if [[ $(head -n1 "$i") =~ "python3" && "$PYTHON" != "python3" ]]; then
|
||||
echo "Skipping $i - it's Python3 only."
|
||||
continue
|
||||
fi
|
||||
echo "Running $i"
|
||||
cd "$(dirname "$i")"
|
||||
SCRIPT=$(basename "$i")
|
||||
|
|
@ -31,7 +27,7 @@ function run_tests {
|
|||
function run_pre_commit {
|
||||
set +e #disable error trapping
|
||||
if ! pre-commit run --all-files --hook-stage manual check-ast ; then
|
||||
echo "Syntax check failed for either Python 2 or 3"
|
||||
echo "Syntax check failed."
|
||||
ERRORS=$((ERRORS+1))
|
||||
fi
|
||||
set -e #re-enable error trapping
|
||||
|
|
@ -46,9 +42,6 @@ cd /workspace/cp2k
|
|||
ALL_TEST_SCRIPTS=$(find ./src/ ./tools/ -name "*_test.py" -executable)
|
||||
ESSENTIAL_TEST_SCRIPTS=$(find ./tools/build_utils -name "*_test.py" -executable)
|
||||
|
||||
# python 2.7
|
||||
run_tests python2.7 "${ALL_TEST_SCRIPTS}"
|
||||
|
||||
# python 3.x
|
||||
run_tests python3 "${ALL_TEST_SCRIPTS}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue