mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-04-10 06:13:41 +02:00
Test that generate_test_code.py is still compatible with Python 2
When Mbed TLS 2.16 was released, the requirement was Python 2, not Python 3. Since then, upstream Python 2 support has stopped, but it is still maintained in some long-term-support distributions. For the sake of users who build the unit tests in such environments, test that generate_test_code.py remains compatible with Python 2. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@@ -691,6 +691,18 @@ component_check_doxygen_warnings () {
|
||||
record_status tests/scripts/doxygen.sh
|
||||
}
|
||||
|
||||
component_check_python2 () {
|
||||
# Check that what used to work with Python 2 still works with Python 2.
|
||||
msg "check: python2 compatibility"
|
||||
mkdir -p tests/with_python2 tests/with_python3
|
||||
make -C tests PYTHON=python2 c_files
|
||||
mv tests/test_suite_*.c tests/with_python2/
|
||||
make -C tests PYTHON=python3 c_files
|
||||
mv tests/test_suite_*.c tests/with_python3/
|
||||
diff -r tests/with_python2 tests/with_python3
|
||||
rm -rf tests/with_python2 tests/with_python3
|
||||
}
|
||||
|
||||
|
||||
|
||||
################################################################
|
||||
|
||||
Reference in New Issue
Block a user