Skip to content
New issue

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

Separate process per test for TS2K Windows tests #706

Merged
merged 6 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions test/builds/multiprocess_ts2k_tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# The tests run out of memory on CI see https://github.com/microsoft/knossos-ksc/issues/679 for details of the leak in module creation
# pytest-forked on Windows doesn't help, so: collect the tests, run one at a time, exit on any failure
$alltests = pytest $PSScriptRoot\..\ts2k\ --collect-only --quiet --disable-pytest-warnings | Select-Object -skip 2 -last 1000000

$alltests

Foreach ($test in $alltests)
{
$test
$test_output = pytest $test
if ( 0 -ne $LastExitcode)
{
Write-Output $test_output
exit $LastExitcode
}
}
5 changes: 4 additions & 1 deletion test/builds/test_pytest_PyTorchPreview.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ python -m pip install --editable . || exit /b
cd ../..

REM we only run a single test for now, multiple tests run out of heap see #679
pytest test\ts2k\test_ts2k.py -k test_cat
REM pytest test\ts2k\test_ts2k.py -k test_cat

REM echo Running pytest on ts2k
REM pytest test/ts2k || exit /b

REM this runs the tests one by one avoiding the memory issues
powershell.exe -file "%~dp0multiprocess_ts2k_tests.ps1" || exit /b