1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
From: Roland Mas <roland.mas@entierement.net>
Date: Tue, 24 Jun 2025 15:52:07 +0200
Subject: Testsuite: force python3
---
test/Makefile | 36 ++++++++++++++++++------------------
test/internal/test_py.py | 2 +-
test/internal/test_pytest.py | 2 +-
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/test/Makefile b/test/Makefile
index d882fd3..c61e463 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -23,7 +23,7 @@ full: unittests examples benchmarks
full_knownbugs: unittests_knownbugs examples benchmarks
benchmarks:
- cd python && python complexity.py; cd ..
+ cd python && python3 complexity.py; cd ..
python: unittests_py examples_indoc_py examples_code_py user_guide_snippets_py
@@ -39,21 +39,21 @@ unittests: unittests_py
unittests_knownbugs: unittests_py_knownbugs
unittests_py_slow:
- python internal/test_pytest.py python -skipfiles="alltests.py helpers.py complexity.py speed.py" -passoptions="--run_slow"
+ python3 internal/test_pytest.py python3 -skipfiles="alltests.py helpers.py complexity.py speed.py" -passoptions="--run_slow"
unittests_py_valgrind:
- python internal/test_pytest.py python -skipfiles="alltests.py helpers.py complexity.py speed.py" -memcheck -passoptions="--ignore_memory_heavy"
+ python3 internal/test_pytest.py python3 -skipfiles="alltests.py helpers.py complexity.py speed.py" -memcheck -passoptions="--ignore_memory_heavy"
unittests_py:
ifdef MEMCHECK
- python internal/test_pytest.py python -skipfiles="alltests.py helpers.py complexity.py speed.py" -passoptions="--ignore_memory_light --run_slow"
- python internal/test_pytest.py python -skipfiles="alltests.py helpers.py complexity.py speed.py" $(MEMCHECK) -passoptions="--ignore_memory_heavy --run_slow"
+ python3 internal/test_pytest.py python3 -skipfiles="alltests.py helpers.py complexity.py speed.py" -passoptions="--ignore_memory_light --run_slow"
+ python3 internal/test_pytest.py python3 -skipfiles="alltests.py helpers.py complexity.py speed.py" $(MEMCHECK) -passoptions="--ignore_memory_heavy --run_slow"
else
- python internal/test_pytest.py python -skipfiles="alltests.py helpers.py complexity.py speed.py" # No memory checks
+ python3 internal/test_pytest.py python3 -skipfiles="alltests.py helpers.py complexity.py speed.py" # No memory checks
endif
unittests_py_knownbugs:
- python internal/test_pytest.py python -skipfiles="alltests.py helpers.py complexity.py speed.py" -passoptions="--known_bugs"
+ python3 internal/test_pytest.py python3 -skipfiles="alltests.py helpers.py complexity.py speed.py" -passoptions="--known_bugs"
examples: examples_indoc examples_code
@@ -62,41 +62,41 @@ examples_indoc: examples_indoc_py examples_indoc_cpp
examples_code: examples_code_py examples_code_cpp
unittests_matlab:
- python internal/test_matlab.py matlab
+ python3 internal/test_matlab.py matlab
unittests_octave:
- python internal/test_octave.py octave
- python internal/test_octave.py matlab -skipfiles="callback.m nlp_callback.m"
+ python3 internal/test_octave.py octave
+ python3 internal/test_octave.py matlab -skipfiles="callback.m nlp_callback.m"
examples_matlab:
- python internal/test_matlab.py '../docs/examples/matlab' -skipfiles="MyCallback.m NlpCallback.m"
+ python3 internal/test_matlab.py '../docs/examples/matlab' -skipfiles="MyCallback.m NlpCallback.m"
examples_octave:
- python internal/test_octave.py '../docs/examples/matlab' -skipfiles="MyCallback.m NlpCallback.m callback.m nlp_callback.m"
+ python3 internal/test_octave.py '../docs/examples/matlab' -skipfiles="MyCallback.m NlpCallback.m callback.m nlp_callback.m"
# No memchecks because there is a memory leak in SuperLU
examples_indoc_py:
- python internal/test_py.py '../docs/api/examples'
+ python3 internal/test_py.py '../docs/api/examples'
# No memchecks because it leaks like hell, and is slow
examples_code_py:
- python internal/test_py.py '../docs/examples/python' -skipfiles="c_code_generation.py"
+ python3 internal/test_py.py '../docs/examples/python' -skipfiles="c_code_generation.py"
examples_indoc_cpp:
- python internal/test_cpp.py '../docs/api/examples' $(MEMCHECK)
+ python3 internal/test_cpp.py '../docs/api/examples' $(MEMCHECK)
doxygen:
cd '../docs/api/' ; make doxtest
# No memchecks because it's slow
examples_code_cpp:
- python internal/test_cppcmake.py '../docs/examples/cplusplus' -skipfiles="test_liftopt.cpp casadi_error_handling.cpp test_opencl.cpp nlp_codegen.cpp codegen_usage.cpp stabilized_sqpmethod_nl.cpp knitro_nl.cpp worhp_nl.cpp snopt_nl.cpp rocket_snopt.cpp test_blocksqp.cpp" -skipdirs="cmake_find_package cmake_pkgconfig"
+ python3 internal/test_cppcmake.py '../docs/examples/cplusplus' -skipfiles="test_liftopt.cpp casadi_error_handling.cpp test_opencl.cpp nlp_codegen.cpp codegen_usage.cpp stabilized_sqpmethod_nl.cpp knitro_nl.cpp worhp_nl.cpp snopt_nl.cpp rocket_snopt.cpp test_blocksqp.cpp" -skipdirs="cmake_find_package cmake_pkgconfig"
cd "../docs/examples/cplusplus/cmake_find_package" && ./run.sh && cd ../../../../test
cd "../docs/examples/cplusplus/cmake_pkgconfig" && ./run.sh && cd ../../../../test
user_guide_snippets_py:
- cd '../docs/users_guide/' && python run_snippets.py python && cd ../..
+ cd '../docs/users_guide/' && python3 run_snippets.py python3 && cd ../..
user_guide_snippets_oct:
- cd '../docs/users_guide/' && python run_snippets.py octave && cd ../..
+ cd '../docs/users_guide/' && python3 run_snippets.py octave && cd ../..
diff --git a/test/internal/test_py.py b/test/internal/test_py.py
index 08fe871..47fba1e 100644
--- a/test/internal/test_py.py
+++ b/test/internal/test_py.py
@@ -45,7 +45,7 @@ def removedummybackend(dir):
if os.path.exists(dir+'/pylab.py'):
os.remove(dir+'/pylab.py')
-python = "python"
+python = "python3"
if "WITH_PYTHON3" in os.environ:
python = "python3"
diff --git a/test/internal/test_pytest.py b/test/internal/test_pytest.py
index 3e6d043..e27c28e 100644
--- a/test/internal/test_pytest.py
+++ b/test/internal/test_pytest.py
@@ -45,7 +45,7 @@ def removedummybackend(dir):
if os.path.exists(dir+'/pylab.py'):
os.remove(dir+'/pylab.py')
-python = "python"
+python = "python3"
if "WITH_PYTHON3" in os.environ:
python = "python3"
|