Skip to content

Skip tests that fail on Windows. #24435

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

Merged
merged 1 commit into from
May 29, 2025
Merged

Conversation

juj
Copy link
Collaborator

@juj juj commented May 29, 2025

These tests are not in a good shape on Windows, or assume Linux/macOS behavior.

Something that I might be able to look into later, but for now want to focus on getting a passing test run on a Windows system.

Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The path forward for fixing these BTW is to add @crossplatform to each of these tests. That will force the tests to run on all platforms in CI.

@juj
Copy link
Collaborator Author

juj commented May 29, 2025

The path forward for fixing these BTW is to add @crossplatform to each of these tests. That will force the tests to run on all platforms in CI.

How does that work? All tests run on a Linux(?) system, and @crossplatform tests run additionally on Windows, and on macOS as well(?)

@juj juj force-pushed the skip_linux_tests branch from da7244c to 636c762 Compare May 29, 2025 21:02
@juj juj enabled auto-merge (squash) May 29, 2025 21:02
@juj juj disabled auto-merge May 29, 2025 21:26
@juj juj merged commit d4bdb53 into emscripten-core:main May 29, 2025
14 of 30 checks passed
@sbc100
Copy link
Collaborator

sbc100 commented May 29, 2025

The path forward for fixing these BTW is to add @crossplatform to each of these tests. That will force the tests to run on all platforms in CI.

How does that work? All tests run on a Linux(?) system, and @crossplatform tests run additionally on Windows, and on macOS as well(?)

Basically yes. We run just a limited number of mac and windows tests in the emscirpten CI due the exact cost of CI minutes on those platforms (each minute is N times more expensive than on linux).

We do run a lot more tests on the emscripten-releases waterfall were we are not budget limited: https://ci.chromium.org/p/emscripten-releases/g/main/console, so I'm a little confused why these didn't already get cauht.

@sbc100
Copy link
Collaborator

sbc100 commented May 29, 2025

Indeed it looks like we already run the whole of other and core on windows: https://ci.chromium.org/ui/p/emscripten-releases/builders/ci/win/b8713510118573292401/overview

So the need for this change is confusing..

@sbc100
Copy link
Collaborator

sbc100 commented May 29, 2025

Indeed test_abspaths and test_emsize (I only checked those two) seem to run fine on windows in emscripten-release CI.

@juj
Copy link
Collaborator Author

juj commented May 29, 2025

other.test_abspaths gives this for me on Windows deterministically:

C:\emsdk\emscripten\main>test\runner other.test_abspaths
Running test_other: (1 tests)
test_abspaths (test_other.other.test_abspaths) ... ['-I/usr/something', '-Wwarn-absolute-paths'] True
FAIL

======================================================================
FAIL: test_abspaths (test_other.other.test_abspaths)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\emsdk\emscripten\main\test\test_other.py", line 1777, in test_abspaths
    self.assertContainedIf(WARNING, proc.stderr, expected)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\emsdk\emscripten\main\test\common.py", line 1690, in assertContainedIf
    self.assertContained(value, string)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "C:\emsdk\emscripten\main\test\common.py", line 1675, in assertContained
    self.fail("Expected to find '%s' in '%s', diff:\n\n%s\n%s" % (
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      limit_size(values[0]), limit_size(string), limit_size(diff),
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      additional_info,
      ^^^^^^^^^^^^^^^^
    ))
    ^^
AssertionError: Expected to find 'encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript)
' in '
', diff:

--- expected
+++ actual
@@ -1 +1 @@
-encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript)
+



----------------------------------------------------------------------
Ran 1 test in 0.573s

FAILED (failures=1)

@juj
Copy link
Collaborator Author

juj commented May 29, 2025

And other.test_emsize:

C:\emsdk\emscripten\main>test\runner other.test_emsize
Running test_other: (1 tests)
test_emsize (test_other.other.test_emsize) ... FAIL

======================================================================
FAIL: test_emsize (test_other.other.test_emsize)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\emsdk\emscripten\main\test\test_other.py", line 835, in test_emsize
    self.assertContained(expected, output)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "C:\emsdk\emscripten\main\test\common.py", line 1675, in assertContained
    self.fail("Expected to find '%s' in '%s', diff:\n\n%s\n%s" % (
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      limit_size(values[0]), limit_size(string), limit_size(diff),
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      additional_info,
      ^^^^^^^^^^^^^^^^
    ))
    ^^
AssertionError: Expected to find 'section      size   addr
TYPE           51     10
IMPORT         31     63
FUNCTION       14     96
GLOBAL          9    112
EXPORT          9    123
ELEM            9    134
CODE         1556    146
DATA           77   1704
JS              6756    0
Total           8512
' in 'C:\emsdk\emscripten\main\test\other\test_emsize.wasm  :
section      size   addr
TYPE           51     10
IMPORT         31     63
FUNCTION       14     96
GLOBAL          9    112
EXPORT          9    123
ELEM            9    134
CODE         1556    146
DATA           77   1704
JS              6773    0
Total           8529
', diff:

--- expected
+++ actual
@@ -1,3 +1,4 @@
+C:\emsdk\emscripten\main\test\other\test_emsize.wasm  :
 section      size   addr
 TYPE           51     10
 IMPORT         31     63
@@ -7,6 +8,6 @@
 ELEM            9    134
 CODE         1556    146
 DATA           77   1704
-JS             6756    0
-Total          8512
+JS             6773    0
+Total          8529




----------------------------------------------------------------------
Ran 1 test in 0.141s

FAILED (failures=1)

C:\emsdk\emscripten\main>

If I do this, then the test will pass:

image

@juj
Copy link
Collaborator Author

juj commented May 29, 2025

(the git warning comes from the fact that I mucked with the file endings like that)

@juj
Copy link
Collaborator Author

juj commented May 29, 2025

Ohh... well this is interesting:

image

@juj
Copy link
Collaborator Author

juj commented May 29, 2025

Asked a question at python/cpython#134904 to see what python authors think.

sbc100 added a commit to sbc100/emscripten that referenced this pull request May 29, 2025
Marking these tests as `@crossplatform` so they will run on windows
and macOS during emscripten CI.

Followup to emscripten-core#24435 that disabled these tests under windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants