Skip to content

Commit

Permalink
Update node canary used in testing. NFC (emscripten-core#20817)
Browse files Browse the repository at this point in the history
The two tests that explicitly check the LANG environment needed updating
because the new version of node now exposed `navigator.language`.
Support both `en-US` and `C` in the test output in order to support both
old and new versions of node.  (Sadly setting LANG=C in the version
doesn't work, and just results it me seeing my default locale).

Split out from emscripten-core#20725
  • Loading branch information
sbc100 authored Dec 1, 2023
1 parent 06561ee commit 216ac25
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ commands:
description: "install canary version of node"
steps:
- install-node-version:
node_version: "21.0.0-v8-canary202309143a48826a08"
node_version: "22.0.0-v8-canary20231108ff311d5a39"
canary: true
install-v8:
description: "install v8 using jsvu"
Expand Down Expand Up @@ -651,6 +651,7 @@ jobs:
- upload-test-results
test-wasm64_4gb:
environment:
LANG: "C.UTF-8"
# Only run 2 tests at a time to avoid OOM (since each tests used >4gb)
EMCC_CORES: "2"
# We don't use `bionic` here since its too old to run recent node versions:
Expand Down Expand Up @@ -721,6 +722,7 @@ jobs:
# `/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found`
executor: linux-python
environment:
LANG: "C.UTF-8"
EMTEST_SKIP_V8: "1"
steps:
- checkout
Expand Down
2 changes: 1 addition & 1 deletion test/core/test_env.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LOGNAME=web_user
PATH=/
PWD=/
HOME=/home/web_user
LANG=C.UTF-8
LANG=(C|en_US).UTF-8
_=.*(/test_env.js|./this.program)

getenv\(PATH\): /
Expand Down
2 changes: 1 addition & 1 deletion test/core/test_environ.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ LOGNAME=web_user
PATH=/
PWD=/
HOME=/home/web_user
LANG=C.UTF-8
LANG=(C|en_US).UTF-8
_=.*(/test_environ.js|/this.program)
10 changes: 10 additions & 0 deletions test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -6412,9 +6412,19 @@ def test_uname(self):
def test_unary_literal(self):
self.do_core_test('test_unary_literal.cpp')

@crossplatform
# Explictly set LANG here since new versions of node expose
# `navigator.languages` which emscripten will honor and we
# want the test output to be consistent.
@with_env_modify({'LANG': 'en_US.UTF-8'})
def test_env(self):
self.do_core_test('test_env.c', regex=True)

@crossplatform
# Explictly set LANG here since new versions of node expose
# `navigator.languages` which emscripten will honor and we
# want the test output to be consistent.
@with_env_modify({'LANG': 'en_US.UTF-8'})
def test_environ(self):
self.do_core_test('test_environ.c', regex=True)

Expand Down

0 comments on commit 216ac25

Please sign in to comment.