@@ -105,6 +105,32 @@ env:
105105 test_unpack
106106 test_weakref
107107 test_yield_from
108+ ENV_POLLUTING_TESTS_COMMON : >-
109+ test_raise
110+ test_ssl
111+ test_sys
112+ ENV_POLLUTING_TESTS_LINUX : >-
113+ test.test_multiprocessing_fork.test_processes
114+ test.test_multiprocessing_fork.test_threads
115+ test.test_multiprocessing_forkserver.test_processes
116+ test.test_multiprocessing_forkserver.test_threads
117+ test.test_multiprocessing_spawn.test_processes
118+ test.test_multiprocessing_spawn.test_threads
119+ test_file_eintr
120+ test_subprocess
121+ ENV_POLLUTING_TESTS_MACOS : >-
122+ test_multiprocessing_forkserver.test_manager
123+ test.test_multiprocessing_forkserver.test_misc
124+ test.test_multiprocessing_forkserver.test_processes
125+ test.test_multiprocessing_forkserver.test_threads
126+ test.test_multiprocessing_spawn.test_manager
127+ test.test_multiprocessing_spawn.test_misc
128+ test.test_multiprocessing_spawn.test_processes
129+ test.test_multiprocessing_spawn.test_threads
130+ test_ftplib
131+ test_logging
132+ test_multiprocessing_main_handling
133+ test_subprocess
108134 # Python version targeted by the CI.
109135 PYTHON_VERSION : " 3.13.1"
110136
@@ -292,26 +318,47 @@ jobs:
292318
293319 - if : runner.os == 'Linux'
294320 name : run cpython platform-independent tests
321+ env :
322+ RUSTPYTHON_SKIP_ENV_POLLUTERS : true
295323 run :
296324 target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed --timeout 600 -v ${{ env.PLATFORM_INDEPENDENT_TESTS }}
297325 timeout-minutes : 35
298326
299327 - if : runner.os == 'Linux'
300328 name : run cpython platform-dependent tests (Linux)
329+ env :
330+ RUSTPYTHON_SKIP_ENV_POLLUTERS : true
301331 run : target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }}
302332 timeout-minutes : 35
303333
304334 - if : runner.os == 'macOS'
305335 name : run cpython platform-dependent tests (MacOS)
336+ env :
337+ RUSTPYTHON_SKIP_ENV_POLLUTERS : true
306338 run : target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }}
307339 timeout-minutes : 35
308340
309341 - if : runner.os == 'Windows'
310342 name : run cpython platform-dependent tests (windows partial - fixme)
343+ env :
344+ RUSTPYTHON_SKIP_ENV_POLLUTERS : true
311345 run :
312346 target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} ${{ env.WINDOWS_SKIPS }}
313347 timeout-minutes : 45
314348
349+ - if : runner.os == 'Linux'
350+ name : run cpython tests to check if env polluters have stopped polluting (Common/Linux)
351+ run : |
352+ for thing in ${{ env.ENV_POLLUTING_TESTS_COMMON }} ${{ env.ENV_POLLUTING_TESTS_LINUX }}; do
353+ ! target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v ${thing}
354+ exitcode=$?
355+ if [ $exitcode -ne 0 ]; then
356+ echo "Test ${thing} is no longer polluting the environment!"
357+ exit 422
358+ fi
359+ done
360+ timeout-minutes : 15
361+
315362 - if : runner.os != 'Windows'
316363 name : check that --install-pip succeeds
317364 run : |
0 commit comments