| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -105,6 +105,23 @@ env: | |
| test_unpack | ||
| test_weakref | ||
| test_yield_from | ||
| ENV_POLLUTING_TESTS_COMMON: >- | ||
| test_threading | ||
| ENV_POLLUTING_TESTS_LINUX: >- | ||
| test.test_concurrent_futures.test_thread_pool | ||
| test.test_multiprocessing_fork.test_processes | ||
| test.test_multiprocessing_fork.test_threads | ||
| test.test_multiprocessing_forkserver.test_processes | ||
| test.test_multiprocessing_forkserver.test_threads | ||
| test.test_multiprocessing_spawn.test_processes | ||
| test.test_multiprocessing_spawn.test_threads | ||
| ENV_POLLUTING_TESTS_MACOS: >- | ||
| test.test_concurrent_futures.test_thread_pool | ||
| test.test_multiprocessing_forkserver.test_processes | ||
| test.test_multiprocessing_forkserver.test_threads | ||
| test.test_multiprocessing_spawn.test_processes | ||
| test.test_multiprocessing_spawn.test_threads | ||
| ENV_POLLUTING_TESTS_WINDOWS: >- | ||
| # Python version targeted by the CI. | ||
| PYTHON_VERSION: "3.13.1" | ||
| X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR: C:\Program Files\OpenSSL\lib\VC\x64\MD | ||
| Expand All | @@ -116,7 +133,7 @@ jobs: | |
| env: | ||
| RUST_BACKTRACE: full | ||
| name: Run rust tests | ||
| runs-on: ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 45 | ||
| strategy: | ||
| matrix: | ||
| Expand Down Expand Up | @@ -147,8 +164,7 @@ jobs: | |
| run: cargo check ${{ env.CARGO_ARGS }} | ||
|
|
||
| - name: Test openssl build | ||
| run: | ||
| cargo build --no-default-features --features ssl-openssl | ||
| run: cargo build --no-default-features --features ssl-openssl | ||
| if: runner.os == 'Linux' | ||
|
|
||
| # - name: Install tk-dev for tkinter build | ||
| Expand All | @@ -160,7 +176,7 @@ jobs: | |
| # if: runner.os == 'Linux' | ||
|
|
||
| - name: Test example projects | ||
| run: | ||
| run: | | ||
| cargo run --manifest-path example_projects/barebone/Cargo.toml | ||
| cargo run --manifest-path example_projects/frozen_stdlib/Cargo.toml | ||
| if: runner.os == 'Linux' | ||
| Expand Down Expand Up | @@ -248,7 +264,7 @@ jobs: | |
| env: | ||
| RUST_BACKTRACE: full | ||
| name: Run snippets and cpython tests | ||
| runs-on: ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [macos-latest, ubuntu-latest, windows-2025] | ||
| Expand Down Expand Up | @@ -278,26 +294,116 @@ jobs: | |
|
|
||
| - if: runner.os == 'Linux' | ||
| name: run cpython platform-independent tests | ||
| run: | ||
| target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed -v ${{ env.PLATFORM_INDEPENDENT_TESTS }} | ||
| env: | ||
| RUSTPYTHON_SKIP_ENV_POLLUTERS: true | ||
| run: target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed --timeout 600 -v ${{ env.PLATFORM_INDEPENDENT_TESTS }} | ||
| timeout-minutes: 35 | ||
|
|
||
| - if: runner.os == 'Linux' | ||
| name: run cpython platform-dependent tests (Linux) | ||
| run: target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} | ||
| env: | ||
| RUSTPYTHON_SKIP_ENV_POLLUTERS: true | ||
| run: target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} | ||
| timeout-minutes: 35 | ||
|
|
||
| - if: runner.os == 'macOS' | ||
| name: run cpython platform-dependent tests (MacOS) | ||
| run: target/release/rustpython -m test -j 1 --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} | ||
| env: | ||
| RUSTPYTHON_SKIP_ENV_POLLUTERS: true | ||
| run: target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} | ||
| timeout-minutes: 35 | ||
|
|
||
| - if: runner.os == 'Windows' | ||
| name: run cpython platform-dependent tests (windows partial - fixme) | ||
| run: | ||
| target/release/rustpython -m test -j 1 --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} ${{ env.WINDOWS_SKIPS }} | ||
| env: | ||
| RUSTPYTHON_SKIP_ENV_POLLUTERS: true | ||
| run: target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} ${{ env.WINDOWS_SKIPS }} | ||
| timeout-minutes: 45 | ||
|
|
||
| - if: runner.os == 'Linux' | ||
| name: run cpython tests to check if env polluters have stopped polluting (Common/Linux) | ||
| shell: bash | ||
| run: | | ||
| for thing in ${{ env.ENV_POLLUTING_TESTS_COMMON }} ${{ env.ENV_POLLUTING_TESTS_LINUX }}; do | ||
| for i in $(seq 1 10); do | ||
| set +e | ||
| target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v ${thing} | ||
| exit_code=$? | ||
| set -e | ||
| if [ ${exit_code} -eq 3 ]; then | ||
| echo "Test ${thing} polluted the environment on attempt ${i}." | ||
| break | ||
| fi | ||
| done | ||
| if [ ${exit_code} -ne 3 ]; then | ||
| echo "Test ${thing} is no longer polluting the environment after ${i} attempts!" | ||
| echo "Please remove ${thing} from either ENV_POLLUTING_TESTS_COMMON or ENV_POLLUTING_TESTS_LINUX in '.github/workflows/ci.yaml'." | ||
| echo "Please also remove the skip decorators that include the word 'POLLUTERS' in ${thing}." | ||
| if [ ${exit_code} -ne 0 ]; then | ||
| echo "Test ${thing} failed with exit code ${exit_code}." | ||
| echo "Please investigate which test item in ${thing} is failing and either mark it as an expected failure or a skip." | ||
| fi | ||
| exit 1 | ||
| fi | ||
| done | ||
| timeout-minutes: 15 | ||
|
Comment thread
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| - if: runner.os == 'macOS' | ||
| name: run cpython tests to check if env polluters have stopped polluting (Common/macOS) | ||
| shell: bash | ||
| run: | | ||
| for thing in ${{ env.ENV_POLLUTING_TESTS_COMMON }} ${{ env.ENV_POLLUTING_TESTS_MACOS }}; do | ||
| for i in $(seq 1 10); do | ||
| set +e | ||
| target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v ${thing} | ||
| exit_code=$? | ||
| set -e | ||
| if [ ${exit_code} -eq 3 ]; then | ||
| echo "Test ${thing} polluted the environment on attempt ${i}." | ||
| break | ||
| fi | ||
| done | ||
| if [ ${exit_code} -ne 3 ]; then | ||
| echo "Test ${thing} is no longer polluting the environment after ${i} attempts!" | ||
| echo "Please remove ${thing} from either ENV_POLLUTING_TESTS_COMMON or ENV_POLLUTING_TESTS_MACOS in '.github/workflows/ci.yaml'." | ||
| echo "Please also remove the skip decorators that include the word 'POLLUTERS' in ${thing}." | ||
| if [ ${exit_code} -ne 0 ]; then | ||
| echo "Test ${thing} failed with exit code ${exit_code}." | ||
| echo "Please investigate which test item in ${thing} is failing and either mark it as an expected failure or a skip." | ||
| fi | ||
| exit 1 | ||
| fi | ||
| done | ||
| timeout-minutes: 15 | ||
|
Comment thread
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| - if: runner.os == 'Windows' | ||
| name: run cpython tests to check if env polluters have stopped polluting (Common/windows) | ||
| shell: bash | ||
| run: | | ||
| for thing in ${{ env.ENV_POLLUTING_TESTS_COMMON }} ${{ env.ENV_POLLUTING_TESTS_WINDOWS }}; do | ||
| for i in $(seq 1 10); do | ||
| set +e | ||
| target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v ${thing} | ||
| exit_code=$? | ||
| set -e | ||
| if [ ${exit_code} -eq 3 ]; then | ||
| echo "Test ${thing} polluted the environment on attempt ${i}." | ||
| break | ||
| fi | ||
| done | ||
| if [ ${exit_code} -ne 3 ]; then | ||
| echo "Test ${thing} is no longer polluting the environment after ${i} attempts!" | ||
| echo "Please remove ${thing} from either ENV_POLLUTING_TESTS_COMMON or ENV_POLLUTING_TESTS_WINDOWS in '.github/workflows/ci.yaml'." | ||
| echo "Please also remove the skip decorators that include the word 'POLLUTERS' in ${thing}." | ||
| if [ ${exit_code} -ne 0 ]; then | ||
| echo "Test ${thing} failed with exit code ${exit_code}." | ||
| echo "Please investigate which test item in ${thing} is failing and either mark it as an expected failure or a skip." | ||
| fi | ||
| exit 1 | ||
| fi | ||
| done | ||
|
Comment thread
Comment on lines
+383
to
+404
Copy link
Copy Markdown
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality@coderabbitai translate this to powershell
Sorry, something went wrong.
coderabbitai[bot] reacted with eyes emoji
All reactions
Copy link
Copy Markdown
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality@fanninpm Here's the PowerShell translation of the Windows environment pollution check script: - if: runner.os == 'Windows'
name: run cpython tests to check if env polluters have stopped polluting (Common/windows)
shell: pwsh
run: |
$tests = "${{ env.ENV_POLLUTING_TESTS_COMMON }} ${{ env.ENV_POLLUTING_TESTS_WINDOWS }}" -split '\s+' | Where-Object { $_ }
foreach ($thing in $tests) {
for ($i = 1; $i -le 10; $i++) {
target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v $thing
$exit_code = $LASTEXITCODE
if ($exit_code -eq 3) {
Write-Host "Test $thing polluted the environment on attempt $i."
break
}
}
if ($exit_code -ne 3) {
Write-Host "Test $thing is no longer polluting the environment after $i attempts!"
Write-Host "Please remove $thing from either ENV_POLLUTING_TESTS_COMMON or ENV_POLLUTING_TESTS_WINDOWS in ``.github/workflows/ci.yaml``."
Write-Host "Please also remove the skip decorators that include the word 'POLLUTERS' in $thing."
if ($exit_code -ne 0) {
Write-Host "Test $thing failed with exit code $exit_code."
Write-Host "Please investigate which test item in $thing is failing and either mark it as an expected failure or a skip."
}
exit 1
}
}Key changes from bash:
Sorry, something went wrong.
All reactions
|
||
| timeout-minutes: 15 | ||
|
Comment thread
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| - if: runner.os != 'Windows' | ||
| name: check that --install-pip succeeds | ||
| run: | | ||
| Expand All | @@ -323,7 +429,7 @@ jobs: | |
| - uses: actions/checkout@v6.0.1 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: clippy | ||
| components: clippy | ||
|
|
||
| - name: run clippy on wasm | ||
| run: cargo clippy --manifest-path=crates/wasm/Cargo.toml -- -Dwarnings | ||
| Expand Down Expand Up | @@ -360,7 +466,7 @@ jobs: | |
| - name: spell checker | ||
| uses: streetsidesoftware/cspell-action@v8 | ||
| with: | ||
| files: '**/*.rs' | ||
| files: "**/*.rs" | ||
| incremental_files_only: true | ||
|
|
||
| miri: | ||
| Expand All | @@ -375,17 +481,17 @@ jobs: | |
|
|
||
| - uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: ${{ env.NIGHTLY_CHANNEL }} | ||
| components: miri | ||
| toolchain: ${{ env.NIGHTLY_CHANNEL }} | ||
| components: miri | ||
|
|
||
| - uses: Swatinem/rust-cache@v2 | ||
|
|
||
| - name: Run tests under miri | ||
| run: cargo +${{ env.NIGHTLY_CHANNEL }} miri test -p rustpython-vm -- miri_test | ||
| env: | ||
| # miri-ignore-leaks because the type-object circular reference means that there will always be | ||
| # a memory leak, at least until we have proper cyclic gc | ||
| MIRIFLAGS: '-Zmiri-ignore-leaks' | ||
| # miri-ignore-leaks because the type-object circular reference means that there will always be | ||
| # a memory leak, at least until we have proper cyclic gc | ||
| MIRIFLAGS: "-Zmiri-ignore-leaks" | ||
|
|
||
| wasm: | ||
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }} | ||
| Expand Down | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| from test.libregrtest import main | ||
| main() | ||
| from test.libregrtest.main import main | ||
| main(_add_python_opts=True) |
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.