Skip to content

Commit

Permalink
Fix test_libtorch.bat not exiting on error (#109393)
Browse files Browse the repository at this point in the history
For some weird reason, the batch file gets rid of the `exit /b 1` inside the for loop, so failures never actually get surfaced.  Add skips for the tests that were failing.
Also don't run the windows cpu build on main since it's in trunk.  This is what currently works for the rocm build.

The temp file failure originates from #108508 (got fixed before I merged this PR)

I'm not sure when the ChunkRecordIteratorTest started failing, but it was after the above.
Pull Request resolved: #109393
Approved by: https://github.com/malfet
  • Loading branch information
clee2000 authored and pytorchmergebot committed Sep 20, 2023
1 parent 0735f6c commit 05b3a4d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .ci/pytorch/win-test-helpers/test_libtorch.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if not errorlevel 0 exit /b 1
cd %TMP_DIR_WIN%\build\torch\test
for /r "." %%a in (*.exe) do (
call :libtorch_check "%%~na" "%%~fa"
if errorlevel 1 exit /b 1
if errorlevel 1 goto fail
)

goto :eof
Expand All @@ -48,11 +48,15 @@ if "%~1" == "c10_intrusive_ptr_benchmark" (
python test\run_test.py --cpp --verbose -i "cpp/%~1"
if errorlevel 1 (
echo %1 failed with exit code %errorlevel%
exit /b 1
goto fail
)
if not errorlevel 0 (
echo %1 failed with exit code %errorlevel%
exit /b 1
goto fail
)

goto :eof
:eof
exit /b 0

:fail
exit /b 1
2 changes: 2 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ jobs:
test-matrix: ${{ needs.linux-focal-py3_8-clang9-xla-build.outputs.test-matrix }}

win-vs2019-cpu-py3-build:
# don't run build twice on main
if: github.event_name == 'pull_request'
name: win-vs2019-cpu-py3
uses: ./.github/workflows/_win-build.yml
with:
Expand Down
4 changes: 4 additions & 0 deletions caffe2/serialize/inline_container_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ INSTANTIATE_TEST_SUITE_P(
testing::Values(100, 150, 1010));

TEST_P(ChunkRecordIteratorTest, ChunkRead) {
#ifdef _WIN32
GTEST_SKIP() << "Failing on windows";
return;
#endif
auto chunkSize = GetParam();
std::string zipFileName = "output_chunk_" + std::to_string(chunkSize) + ".zip";
const char* fileName = zipFileName.c_str();
Expand Down

0 comments on commit 05b3a4d

Please sign in to comment.