Skip to content

Commit b501dbd

Browse files
committed
Do not perform memory tests for Python3.12.0-3.12.4
1 parent e770526 commit b501dbd

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ jobs:
7171
echo "leak:QPlatformIntegrationFactory::create" >> $PWD/lsan.supp
7272
export LSAN_OPTIONS="suppressions=$PWD/lsan.supp"
7373
fi
74+
FULL_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2,3)
75+
76+
MIN_VERSION="3.12.0"
77+
MAX_VERSION="3.12.4"
78+
export PYTHONQT_RUN_ONLY_MEMORY_TESTS=1
79+
if printf "%s\n" "$MIN_VERSION" "$FULL_VERSION" "$MAX_VERSION" | sort -V -C; then
80+
unset PYTHONQT_RUN_ONLY_MEMORY_TESTS
81+
fi
7482
PYTHONDEVMODE=1 PYTHONASYNCIODEBUG=1 PYTHONWARNINGS=error PYTHONMALLOC=malloc_debug \
7583
UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
7684
make check

tests/PythonQtTestMain.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ int main( int argc, char **argv )
4848
{
4949
QCoreApplication qapp(argc, argv);
5050
int failCount = 0;
51+
if (QProcessEnvironment::systemEnvironment().contains("PYTHONQT_RUN_ONLY_MEMORY_TESTS"))
5152
{
5253
PythonQtMemoryTests test;
5354
failCount += QTest::qExec(&test, argc, argv);

0 commit comments

Comments
 (0)