diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 8f6ff79e009a1..028aec017afa6 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -17,8 +17,7 @@ jobs: python-test: strategy: matrix: - # TODO(b/281098312): pytest fails on windows-latest - os: [ubuntu-latest] + os: [ubuntu-latest, windows-latest] python-version: ['3.7', '3.11'] fail-fast: false runs-on: ${{ matrix.os }} @@ -32,6 +31,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: 'pip' - name: Install Pip Packages run: pip install --require-hashes --no-deps -r ${{ github.workspace }}/docker/pytest/requirements.txt - name: Run Tests diff --git a/cobalt/build/get_build_id_test.py b/cobalt/build/get_build_id_test.py index 0579a72940caa..f9ea8c3c3033c 100644 --- a/cobalt/build/get_build_id_test.py +++ b/cobalt/build/get_build_id_test.py @@ -26,6 +26,8 @@ _TEST_BUILD_NUMBER = 1234 + get_build_id.COMMIT_COUNT_BUILD_NUMBER_OFFSET +# TODO(b/282040638): fix and re-enabled this +@unittest.skipIf(os.name == 'nt', 'Broken on Windows') class GetBuildIdTest(unittest.TestCase): def setUp(self): diff --git a/docker/pytest/requirements.in b/docker/pytest/requirements.in index a15dd49dfe2b4..fffb347035535 100644 --- a/docker/pytest/requirements.in +++ b/docker/pytest/requirements.in @@ -5,3 +5,4 @@ jsonschema<5 junitparser==2.8.0 pexpect==4.8.0 six==1.12.0 +atomicwrites==1.4.1 diff --git a/docker/pytest/requirements.txt b/docker/pytest/requirements.txt index be346fdc5f10e..3dcbe0f1819e5 100644 --- a/docker/pytest/requirements.txt +++ b/docker/pytest/requirements.txt @@ -4,6 +4,9 @@ # # pip-compile --generate-hashes requirements.in # +atomicwrites==1.4.1 \ + --hash=sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11 + # via -r docker/pytest/requirements.in attrs==21.4.0 \ --hash=sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4 \ --hash=sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd diff --git a/starboard/raspi/shared/launcher_test.py b/starboard/raspi/shared/launcher_test.py index 5fe6794046187..58712cbaad31c 100644 --- a/starboard/raspi/shared/launcher_test.py +++ b/starboard/raspi/shared/launcher_test.py @@ -28,6 +28,7 @@ # pylint: disable=missing-class-docstring +@unittest.skipIf(os.name == 'nt', 'Pexpect does not work on Windows') class LauncherTest(unittest.TestCase): def setUp(self): diff --git a/starboard/sabi/generate_sabi_id_test.py b/starboard/sabi/generate_sabi_id_test.py index 8b9477d75512f..ec230f67b9288 100755 --- a/starboard/sabi/generate_sabi_id_test.py +++ b/starboard/sabi/generate_sabi_id_test.py @@ -45,6 +45,9 @@ def testRainyDayNonexistentFile(self): with self.assertRaises(IOError): generate_sabi_id.DoMain(['-f', 'invalid_filename']) + # TODO(b/281098312): fix and re-enable this + @unittest.skipIf(os.name == 'nt', + 'Broken on Windows due to temp path handling') def testRainyDayBadFile(self): bad_sabi_json = tempfile.NamedTemporaryFile(mode='w') # pylint: disable=consider-using-with bad_sabi_json.write('{}')