From 64bbb979decdbfffc3d88b26c1e2045a8e2ed6d8 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 13 Oct 2025 22:42:22 +0200 Subject: [PATCH 1/2] test: move sea tests into test/sea MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes skipping/running these tests easier to manage with a dedicated test runner that can be tweaked for SEA. PR-URL: https://github.com/nodejs/node/pull/60250 Refs: https://github.com/nodejs/node/issues/59553 Reviewed-By: Richard Lau Reviewed-By: Ulises Gascรณn Reviewed-By: Yagiz Nizipli Reviewed-By: Darshan Sen --- .github/CODEOWNERS | 3 +- test/sea/sea.status | 38 ++++++++++++++++ ...executable-application-asset-keys-empty.js | 6 +-- ...ingle-executable-application-asset-keys.js | 6 +-- ...ingle-executable-application-assets-raw.js | 4 +- ...st-single-executable-application-assets.js | 14 +++--- ...cation-disable-experimental-sea-warning.js | 4 +- ...est-single-executable-application-empty.js | 2 +- ...-executable-application-exec-argv-empty.js | 4 +- ...ble-application-exec-argv-extension-cli.js | 4 +- ...ble-application-exec-argv-extension-env.js | 4 +- ...le-application-exec-argv-extension-none.js | 4 +- ...single-executable-application-exec-argv.js | 2 +- ...utable-application-inspect-in-sea-flags.js | 4 +- ...t-single-executable-application-inspect.js | 2 +- ...ble-application-snapshot-and-code-cache.js | 6 +-- ...-executable-application-snapshot-worker.js | 6 +-- ...-single-executable-application-snapshot.js | 12 ++--- ...e-executable-application-use-code-cache.js | 4 +- .../test-single-executable-application.js | 4 +- ...st-single-executable-blob-config-errors.js | 26 +++++------ .../test-single-executable-blob-config.js | 2 +- test/sea/testcfg.py | 6 +++ test/sequential/sequential.status | 45 ------------------- 24 files changed, 105 insertions(+), 107 deletions(-) create mode 100644 test/sea/sea.status rename test/{sequential => sea}/test-single-executable-application-asset-keys-empty.js (97%) rename test/{sequential => sea}/test-single-executable-application-asset-keys.js (98%) rename test/{sequential => sea}/test-single-executable-application-assets-raw.js (98%) rename test/{sequential => sea}/test-single-executable-application-assets.js (96%) rename test/{sequential => sea}/test-single-executable-application-disable-experimental-sea-warning.js (97%) rename test/{sequential => sea}/test-single-executable-application-empty.js (99%) rename test/{sequential => sea}/test-single-executable-application-exec-argv-empty.js (96%) rename test/{sequential => sea}/test-single-executable-application-exec-argv-extension-cli.js (96%) rename test/{sequential => sea}/test-single-executable-application-exec-argv-extension-env.js (98%) rename test/{sequential => sea}/test-single-executable-application-exec-argv-extension-none.js (96%) rename test/{sequential => sea}/test-single-executable-application-exec-argv.js (99%) rename test/{sequential => sea}/test-single-executable-application-inspect-in-sea-flags.js (98%) rename test/{sequential => sea}/test-single-executable-application-inspect.js (99%) rename test/{sequential => sea}/test-single-executable-application-snapshot-and-code-cache.js (98%) rename test/{sequential => sea}/test-single-executable-application-snapshot-worker.js (97%) rename test/{sequential => sea}/test-single-executable-application-snapshot.js (95%) rename test/{sequential => sea}/test-single-executable-application-use-code-cache.js (97%) rename test/{sequential => sea}/test-single-executable-application.js (97%) rename test/{parallel => sea}/test-single-executable-blob-config-errors.js (90%) rename test/{parallel => sea}/test-single-executable-blob-config.js (99%) create mode 100644 test/sea/testcfg.py diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5ef23759b3e1..49047e57554d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -158,8 +158,7 @@ /doc/contributing/maintaining/maintaining-single-executable-application-support.md @nodejs/single-executable /src/node_sea* @nodejs/single-executable /test/fixtures/postject-copy @nodejs/single-executable -/test/parallel/test-single-executable-* @nodejs/single-executable -/test/sequential/test-single-executable-* @nodejs/single-executable +/test/sea @nodejs/single-executable /tools/dep_updaters/update-postject.sh @nodejs/single-executable # Permission Model diff --git a/test/sea/sea.status b/test/sea/sea.status new file mode 100644 index 000000000000..936d0b5e899e --- /dev/null +++ b/test/sea/sea.status @@ -0,0 +1,38 @@ +prefix sea + +# To mark a test as flaky, list the test name in the appropriate section +# below, without ".js", followed by ": PASS,FLAKY". Example: +# sample-test : PASS,FLAKY + +[true] # This section applies to all platforms + +[$system==macos && $arch==x64] +# https://github.com/nodejs/node/issues/59553 +test-single-executable-application: PASS, FLAKY +test-single-executable-application-assets: PASS, FLAKY +test-single-executable-application-assets-raw: PASS, FLAKY +test-single-executable-application-asset-keys-empty: PASS, FLAKY +test-single-executable-application-asset-keys: PASS, FLAKY +test-single-executable-application-disable-experimental-sea-warning: PASS, FLAKY +test-single-executable-application-empty: PASS, FLAKY +test-single-executable-application-exec-argv: PASS, FLAKY +test-single-executable-application-exec-argv-empty: PASS, FLAKY +test-single-executable-application-exec-argv-extension-cli: PASS, FLAKY +test-single-executable-application-exec-argv-extension-env: PASS, FLAKY +test-single-executable-application-exec-argv-extension-none: PASS, FLAKY +test-single-executable-application-inspect-in-sea-flags: PASS, FLAKY +test-single-executable-application-inspect: PASS, FLAKY +test-single-executable-application-snapshot: PASS, FLAKY +test-single-executable-application-snapshot-and-code-cache: PASS, FLAKY +test-single-executable-application-snapshot-worker: PASS, FLAKY +test-single-executable-application-use-code-cache: PASS, FLAKY + + +[$system==linux && $arch==ppc64] +# https://github.com/nodejs/node/issues/59561 +test-single-executable-application*: SKIP + +[$system==win32] +# https://github.com/nodejs/node/issues/49630 +test-single-executable-application-snapshot: PASS, FLAKY +test-single-executable-application-snapshot-and-code-cache: PASS, FLAKY diff --git a/test/sequential/test-single-executable-application-asset-keys-empty.js b/test/sea/test-single-executable-application-asset-keys-empty.js similarity index 97% rename from test/sequential/test-single-executable-application-asset-keys-empty.js rename to test/sea/test-single-executable-application-asset-keys-empty.js index 77892699a957..9168f2b27235 100644 --- a/test/sequential/test-single-executable-application-asset-keys-empty.js +++ b/test/sea/test-single-executable-application-asset-keys-empty.js @@ -43,7 +43,7 @@ spawnSyncAndExitWithoutError( NODE_DEBUG_NATIVE: 'SEA', ...process.env, }, - cwd: tmpdir.path + cwd: tmpdir.path, }, {}); @@ -57,9 +57,9 @@ spawnSyncAndAssert( env: { ...process.env, NODE_DEBUG_NATIVE: 'SEA', - } + }, }, { stdout: /Asset keys: \[\]/, - } + }, ); diff --git a/test/sequential/test-single-executable-application-asset-keys.js b/test/sea/test-single-executable-application-asset-keys.js similarity index 98% rename from test/sequential/test-single-executable-application-asset-keys.js rename to test/sea/test-single-executable-application-asset-keys.js index e210f61579b3..a2d1dce487e3 100644 --- a/test/sequential/test-single-executable-application-asset-keys.js +++ b/test/sea/test-single-executable-application-asset-keys.js @@ -52,7 +52,7 @@ spawnSyncAndExitWithoutError( NODE_DEBUG_NATIVE: 'SEA', ...process.env, }, - cwd: tmpdir.path + cwd: tmpdir.path, }, {}); @@ -66,9 +66,9 @@ spawnSyncAndAssert( env: { ...process.env, NODE_DEBUG_NATIVE: 'SEA', - } + }, }, { stdout: /Asset keys: \["asset-1\.txt","asset-2\.txt","asset-3\.txt"\]/, - } + }, ); diff --git a/test/sequential/test-single-executable-application-assets-raw.js b/test/sea/test-single-executable-application-assets-raw.js similarity index 98% rename from test/sequential/test-single-executable-application-assets-raw.js rename to test/sea/test-single-executable-application-assets-raw.js index a537f4c7d4f5..ff0fb3ecacdd 100644 --- a/test/sequential/test-single-executable-application-assets-raw.js +++ b/test/sea/test-single-executable-application-assets-raw.js @@ -50,7 +50,7 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se NODE_DEBUG_NATIVE: 'SEA', ...process.env, }, - cwd: tmpdir.path + cwd: tmpdir.path, }); assert(existsSync(seaPrepBlob)); @@ -64,7 +64,7 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se ...process.env, NODE_DEBUG_NATIVE: 'SEA', __TEST_PERSON_JPG: fixtures.path('person.jpg'), - } + }, }, ); } diff --git a/test/sequential/test-single-executable-application-assets.js b/test/sea/test-single-executable-application-assets.js similarity index 96% rename from test/sequential/test-single-executable-application-assets.js rename to test/sea/test-single-executable-application-assets.js index 5d2df60e9fda..dd285021cd71 100644 --- a/test/sequential/test-single-executable-application-assets.js +++ b/test/sea/test-single-executable-application-assets.js @@ -45,12 +45,12 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se process.execPath, ['--experimental-sea-config', 'sea-config.json'], { - cwd: tmpdir.path + cwd: tmpdir.path, }, { status: 1, signal: null, - stderr: /"assets" field of sea-config\.json is not a map of strings/ + stderr: /"assets" field of sea-config\.json is not a map of strings/, }); } @@ -71,12 +71,12 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se process.execPath, ['--experimental-sea-config', 'sea-config.json'], { - cwd: tmpdir.path + cwd: tmpdir.path, }, { status: 1, signal: null, - stderr: /Cannot read asset nonexistent\.txt: no such file or directory/ + stderr: /Cannot read asset nonexistent\.txt: no such file or directory/, }); } @@ -104,7 +104,7 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se NODE_DEBUG_NATIVE: 'SEA', ...process.env, }, - cwd: tmpdir.path + cwd: tmpdir.path, }); assert(existsSync(seaPrepBlob)); @@ -119,11 +119,11 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se NODE_DEBUG_NATIVE: 'SEA', __TEST_PERSON_JPG: fixtures.path('person.jpg'), __TEST_UTF8_TEXT_PATH: fixtures.path('utf8_test_text.txt'), - } + }, }, { trim: true, stdout: fixtures.utf8TestText, - } + }, ); } diff --git a/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js b/test/sea/test-single-executable-application-disable-experimental-sea-warning.js similarity index 97% rename from test/sequential/test-single-executable-application-disable-experimental-sea-warning.js rename to test/sea/test-single-executable-application-disable-experimental-sea-warning.js index 3f7c54b77360..b85a2f2e09f0 100644 --- a/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js +++ b/test/sea/test-single-executable-application-disable-experimental-sea-warning.js @@ -60,8 +60,8 @@ spawnSyncAndAssert( COMMON_DIRECTORY: join(__dirname, '..', 'common'), NODE_DEBUG_NATIVE: 'SEA', ...process.env, - } + }, }, { - stdout: 'Hello, world! ๐Ÿ˜Š\n' + stdout: 'Hello, world! ๐Ÿ˜Š\n', }); diff --git a/test/sequential/test-single-executable-application-empty.js b/test/sea/test-single-executable-application-empty.js similarity index 99% rename from test/sequential/test-single-executable-application-empty.js rename to test/sea/test-single-executable-application-empty.js index f90e52f0c704..6bffc94dbefe 100644 --- a/test/sequential/test-single-executable-application-empty.js +++ b/test/sea/test-single-executable-application-empty.js @@ -59,5 +59,5 @@ spawnSyncAndExitWithoutError( env: { NODE_DEBUG_NATIVE: 'SEA', ...process.env, - } + }, }); diff --git a/test/sequential/test-single-executable-application-exec-argv-empty.js b/test/sea/test-single-executable-application-exec-argv-empty.js similarity index 96% rename from test/sequential/test-single-executable-application-exec-argv-empty.js rename to test/sea/test-single-executable-application-exec-argv-empty.js index 953d0d0e9f87..acae5e8eb50b 100644 --- a/test/sequential/test-single-executable-application-exec-argv-empty.js +++ b/test/sea/test-single-executable-application-exec-argv-empty.js @@ -54,8 +54,8 @@ spawnSyncAndAssert( COMMON_DIRECTORY: join(__dirname, '..', 'common'), NODE_DEBUG_NATIVE: 'SEA', ...process.env, - } + }, }, { - stdout: /empty execArgv test passed/ + stdout: /empty execArgv test passed/, }); diff --git a/test/sequential/test-single-executable-application-exec-argv-extension-cli.js b/test/sea/test-single-executable-application-exec-argv-extension-cli.js similarity index 96% rename from test/sequential/test-single-executable-application-exec-argv-extension-cli.js rename to test/sea/test-single-executable-application-exec-argv-extension-cli.js index 81ff05d53ce7..fcd8602fc763 100644 --- a/test/sequential/test-single-executable-application-exec-argv-extension-cli.js +++ b/test/sea/test-single-executable-application-exec-argv-extension-cli.js @@ -56,8 +56,8 @@ spawnSyncAndAssert( NODE_OPTIONS: '--max-old-space-size=2048', // Should be ignored COMMON_DIRECTORY: join(__dirname, '..', 'common'), NODE_DEBUG_NATIVE: 'SEA', - } + }, }, { - stdout: /execArgvExtension cli test passed/ + stdout: /execArgvExtension cli test passed/, }); diff --git a/test/sequential/test-single-executable-application-exec-argv-extension-env.js b/test/sea/test-single-executable-application-exec-argv-extension-env.js similarity index 98% rename from test/sequential/test-single-executable-application-exec-argv-extension-env.js rename to test/sea/test-single-executable-application-exec-argv-extension-env.js index 25d07bdc468f..1bacba1fb0a3 100644 --- a/test/sequential/test-single-executable-application-exec-argv-extension-env.js +++ b/test/sea/test-single-executable-application-exec-argv-extension-env.js @@ -56,7 +56,7 @@ spawnSyncAndAssert( NODE_OPTIONS: '--max-old-space-size=512', COMMON_DIRECTORY: join(__dirname, '..', 'common'), NODE_DEBUG_NATIVE: 'SEA', - } + }, }, { stdout: /execArgvExtension env test passed/, @@ -64,5 +64,5 @@ spawnSyncAndAssert( assert.doesNotMatch(output, /This warning should not be shown in the output/); return true; }, - trim: true + trim: true, }); diff --git a/test/sequential/test-single-executable-application-exec-argv-extension-none.js b/test/sea/test-single-executable-application-exec-argv-extension-none.js similarity index 96% rename from test/sequential/test-single-executable-application-exec-argv-extension-none.js rename to test/sea/test-single-executable-application-exec-argv-extension-none.js index 272016f006f3..c4036bc50338 100644 --- a/test/sequential/test-single-executable-application-exec-argv-extension-none.js +++ b/test/sea/test-single-executable-application-exec-argv-extension-none.js @@ -56,8 +56,8 @@ spawnSyncAndAssert( NODE_OPTIONS: '--max-old-space-size=2048', COMMON_DIRECTORY: join(__dirname, '..', 'common'), NODE_DEBUG_NATIVE: 'SEA', - } + }, }, { - stdout: /execArgvExtension none test passed/ + stdout: /execArgvExtension none test passed/, }); diff --git a/test/sequential/test-single-executable-application-exec-argv.js b/test/sea/test-single-executable-application-exec-argv.js similarity index 99% rename from test/sequential/test-single-executable-application-exec-argv.js rename to test/sea/test-single-executable-application-exec-argv.js index f24934a0fffc..a60dbe1cab5e 100644 --- a/test/sequential/test-single-executable-application-exec-argv.js +++ b/test/sea/test-single-executable-application-exec-argv.js @@ -55,7 +55,7 @@ spawnSyncAndAssert( NODE_NO_WARNINGS: '0', COMMON_DIRECTORY: join(__dirname, '..', 'common'), NODE_DEBUG_NATIVE: 'SEA', - } + }, }, { stdout: /multiple execArgv test passed/, diff --git a/test/sequential/test-single-executable-application-inspect-in-sea-flags.js b/test/sea/test-single-executable-application-inspect-in-sea-flags.js similarity index 98% rename from test/sequential/test-single-executable-application-inspect-in-sea-flags.js rename to test/sea/test-single-executable-application-inspect-in-sea-flags.js index 32a0ad34848e..66faed4812db 100644 --- a/test/sequential/test-single-executable-application-inspect-in-sea-flags.js +++ b/test/sea/test-single-executable-application-inspect-in-sea-flags.js @@ -38,7 +38,7 @@ writeFileSync(configFile, ` spawnSyncAndExitWithoutError( process.execPath, ['--experimental-sea-config', 'sea-config.json'], - { cwd: tmpdir.path } + { cwd: tmpdir.path }, ); assert(existsSync(seaPrepBlob)); @@ -65,5 +65,5 @@ spawnSyncAndAssert( return true; }, trim: true, - } + }, ); diff --git a/test/sequential/test-single-executable-application-inspect.js b/test/sea/test-single-executable-application-inspect.js similarity index 99% rename from test/sequential/test-single-executable-application-inspect.js rename to test/sea/test-single-executable-application-inspect.js index 009621ddf78b..688b8386eadc 100644 --- a/test/sequential/test-single-executable-application-inspect.js +++ b/test/sea/test-single-executable-application-inspect.js @@ -38,7 +38,7 @@ writeFileSync(configFile, ` spawnSyncAndExitWithoutError( process.execPath, ['--experimental-sea-config', 'sea-config.json'], - { cwd: tmpdir.path } + { cwd: tmpdir.path }, ); assert(existsSync(seaPrepBlob)); diff --git a/test/sequential/test-single-executable-application-snapshot-and-code-cache.js b/test/sea/test-single-executable-application-snapshot-and-code-cache.js similarity index 98% rename from test/sequential/test-single-executable-application-snapshot-and-code-cache.js rename to test/sea/test-single-executable-application-snapshot-and-code-cache.js index 6277381b3bde..24e10a1c12d6 100644 --- a/test/sequential/test-single-executable-application-snapshot-and-code-cache.js +++ b/test/sea/test-single-executable-application-snapshot-and-code-cache.js @@ -56,8 +56,8 @@ const outputFile = join(tmpdir.path, process.platform === 'win32' ? 'sea.exe' : }, }, { - stderr: /"useCodeCache" is redundant when "useSnapshot" is true/ - } + stderr: /"useCodeCache" is redundant when "useSnapshot" is true/, + }, ); assert(existsSync(seaPrepBlob)); @@ -70,7 +70,7 @@ const outputFile = join(tmpdir.path, process.platform === 'win32' ? 'sea.exe' : env: { NODE_DEBUG_NATIVE: 'SEA,MKSNAPSHOT', ...process.env, - } + }, }, { stdout: 'Hello from snapshot', trim: true, diff --git a/test/sequential/test-single-executable-application-snapshot-worker.js b/test/sea/test-single-executable-application-snapshot-worker.js similarity index 97% rename from test/sequential/test-single-executable-application-snapshot-worker.js rename to test/sea/test-single-executable-application-snapshot-worker.js index 50c77743573a..75ae6a270987 100644 --- a/test/sequential/test-single-executable-application-snapshot-worker.js +++ b/test/sea/test-single-executable-application-snapshot-worker.js @@ -70,11 +70,11 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se env: { NODE_DEBUG_NATIVE: 'SEA', ...process.env, - } + }, }, { trim: true, - stdout: 'Hello from Worker' - } + stdout: 'Hello from Worker', + }, ); } diff --git a/test/sequential/test-single-executable-application-snapshot.js b/test/sea/test-single-executable-application-snapshot.js similarity index 95% rename from test/sequential/test-single-executable-application-snapshot.js rename to test/sea/test-single-executable-application-snapshot.js index 552c86a0a1d9..15adcdb9b814 100644 --- a/test/sequential/test-single-executable-application-snapshot.js +++ b/test/sea/test-single-executable-application-snapshot.js @@ -39,12 +39,12 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se process.execPath, ['--experimental-sea-config', 'sea-config.json'], { - cwd: tmpdir.path + cwd: tmpdir.path, }, { status: 1, signal: null, - stderr: /snapshot\.js does not invoke v8\.startupSnapshot\.setDeserializeMainFunction\(\)/ + stderr: /snapshot\.js does not invoke v8\.startupSnapshot\.setDeserializeMainFunction\(\)/, }); } @@ -80,7 +80,7 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se }, }, { - stderr: /Single executable application is an experimental feature/ + stderr: /Single executable application is an experimental feature/, }); assert(existsSync(seaPrepBlob)); @@ -93,7 +93,7 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se env: { NODE_DEBUG_NATIVE: 'SEA,MKSNAPSHOT', ...process.env, - } + }, }, { trim: true, @@ -102,7 +102,7 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se assert.doesNotMatch( output, /Single executable application is an experimental feature/); - } - } + }, + }, ); } diff --git a/test/sequential/test-single-executable-application-use-code-cache.js b/test/sea/test-single-executable-application-use-code-cache.js similarity index 97% rename from test/sequential/test-single-executable-application-use-code-cache.js rename to test/sea/test-single-executable-application-use-code-cache.js index 6d1575ecc6fa..a66930f610ea 100644 --- a/test/sequential/test-single-executable-application-use-code-cache.js +++ b/test/sea/test-single-executable-application-use-code-cache.js @@ -66,8 +66,8 @@ spawnSyncAndAssert( COMMON_DIRECTORY: join(__dirname, '..', 'common'), NODE_DEBUG_NATIVE: 'SEA', ...process.env, - } + }, }, { - stdout: 'Hello, world! ๐Ÿ˜Š\n' + stdout: 'Hello, world! ๐Ÿ˜Š\n', }); diff --git a/test/sequential/test-single-executable-application.js b/test/sea/test-single-executable-application.js similarity index 97% rename from test/sequential/test-single-executable-application.js rename to test/sea/test-single-executable-application.js index 2f8c346b9570..036589c1cb26 100644 --- a/test/sequential/test-single-executable-application.js +++ b/test/sea/test-single-executable-application.js @@ -59,8 +59,8 @@ spawnSyncAndAssert( COMMON_DIRECTORY: join(__dirname, '..', 'common'), NODE_DEBUG_NATIVE: 'SEA', ...process.env, - } + }, }, { - stdout: 'Hello, world! ๐Ÿ˜Š\n' + stdout: 'Hello, world! ๐Ÿ˜Š\n', }); diff --git a/test/parallel/test-single-executable-blob-config-errors.js b/test/sea/test-single-executable-blob-config-errors.js similarity index 90% rename from test/parallel/test-single-executable-blob-config-errors.js rename to test/sea/test-single-executable-blob-config-errors.js index a30850010e2e..322f430aad81 100644 --- a/test/parallel/test-single-executable-blob-config-errors.js +++ b/test/sea/test-single-executable-blob-config-errors.js @@ -16,7 +16,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /Cannot read single executable configuration from non-existent-relative\.json/ + stderr: /Cannot read single executable configuration from non-existent-relative\.json/, }); } @@ -29,7 +29,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /Cannot read single executable configuration from .*non-existent-absolute\.json/ + stderr: /Cannot read single executable configuration from .*non-existent-absolute\.json/, }); } @@ -43,7 +43,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /INCOMPLETE_ARRAY_OR_OBJECT/ + stderr: /INCOMPLETE_ARRAY_OR_OBJECT/, }); } @@ -57,7 +57,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /"main" field of .*empty\.json is not a non-empty string/ + stderr: /"main" field of .*empty\.json is not a non-empty string/, }); } @@ -71,7 +71,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /"main" field of .*no-main\.json is not a non-empty string/ + stderr: /"main" field of .*no-main\.json is not a non-empty string/, }); } @@ -85,7 +85,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /"output" field of .*no-output\.json is not a non-empty string/ + stderr: /"output" field of .*no-output\.json is not a non-empty string/, }); } @@ -105,7 +105,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /"disableExperimentalSEAWarning" field of .*invalid-disableExperimentalSEAWarning\.json is not a Boolean/ + stderr: /"disableExperimentalSEAWarning" field of .*invalid-disableExperimentalSEAWarning\.json is not a Boolean/, }); } @@ -119,7 +119,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /Cannot read main script .*bundle\.js/ + stderr: /Cannot read main script .*bundle\.js/, }); } @@ -129,7 +129,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); const main = tmpdir.resolve('bundle.js'); const configJson = JSON.stringify({ main, - output: 'sea.blob' + output: 'sea.blob', }); writeFileSync(config, configJson, 'utf8'); spawnSyncAndAssert( @@ -138,7 +138,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /Cannot read main script .*bundle\.js/ + stderr: /Cannot read main script .*bundle\.js/, }); } @@ -160,7 +160,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /Cannot write output to .*output-dir/ + stderr: /Cannot write output to .*output-dir/, }); } @@ -173,7 +173,7 @@ const { spawnSyncAndAssert } = require('../common/child_process'); writeFileSync(main, 'console.log("hello")', 'utf-8'); const configJson = JSON.stringify({ main, - output: 'output-dir' + output: 'output-dir', }); writeFileSync(config, configJson, 'utf8'); spawnSyncAndAssert( @@ -182,6 +182,6 @@ const { spawnSyncAndAssert } = require('../common/child_process'); cwd: tmpdir.path, }, { status: 1, - stderr: /Cannot write output to output-dir/ + stderr: /Cannot write output to output-dir/, }); } diff --git a/test/parallel/test-single-executable-blob-config.js b/test/sea/test-single-executable-blob-config.js similarity index 99% rename from test/parallel/test-single-executable-blob-config.js rename to test/sea/test-single-executable-blob-config.js index 4d56bc350667..f3a148ae5a55 100644 --- a/test/parallel/test-single-executable-blob-config.js +++ b/test/sea/test-single-executable-blob-config.js @@ -35,7 +35,7 @@ const assert = require('assert'); writeFileSync(main, 'console.log("hello")', 'utf-8'); const configJson = JSON.stringify({ main: 'bundle.js', - output: 'output.blob' + output: 'output.blob', }); writeFileSync(config, configJson, 'utf8'); const child = spawnSync( diff --git a/test/sea/testcfg.py b/test/sea/testcfg.py new file mode 100644 index 000000000000..341d23919334 --- /dev/null +++ b/test/sea/testcfg.py @@ -0,0 +1,6 @@ +import sys, os +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) +import testpy + +def GetConfiguration(context, root): + return testpy.SimpleTestConfiguration(context, root, 'sea') diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status index c36eac6302d4..627e61911d15 100644 --- a/test/sequential/sequential.status +++ b/test/sequential/sequential.status @@ -14,9 +14,6 @@ test-watch-mode-inspect: PASS, FLAKY test-http2-large-file: PASS, FLAKY [$system==win32] -# https://github.com/nodejs/node/issues/49630 -test-single-executable-application-snapshot: PASS, FLAKY -test-single-executable-application-snapshot-and-code-cache: PASS, FLAKY # https://github.com/nodejs/node/issues/47409 test-http2-large-file: PASS, FLAKY @@ -26,27 +23,6 @@ test-http-server-request-timeouts-mixed: PASS, FLAKY [$system==macos] -[$system==macos && $arch==x64] -# https://github.com/nodejs/node/issues/59553 -test-single-executable-application: PASS, FLAKY -test-single-executable-application-assets: PASS, FLAKY -test-single-executable-application-assets-raw: PASS, FLAKY -test-single-executable-application-asset-keys-empty: PASS, FLAKY -test-single-executable-application-asset-keys: PASS, FLAKY -test-single-executable-application-disable-experimental-sea-warning: PASS, FLAKY -test-single-executable-application-empty: PASS, FLAKY -test-single-executable-application-exec-argv: PASS, FLAKY -test-single-executable-application-exec-argv-empty: PASS, FLAKY -test-single-executable-application-exec-argv-extension-cli: PASS, FLAKY -test-single-executable-application-exec-argv-extension-env: PASS, FLAKY -test-single-executable-application-exec-argv-extension-none: PASS, FLAKY -test-single-executable-application-inspect-in-sea-flags: PASS, FLAKY -test-single-executable-application-inspect: PASS, FLAKY -test-single-executable-application-snapshot: PASS, FLAKY -test-single-executable-application-snapshot-and-code-cache: PASS, FLAKY -test-single-executable-application-snapshot-worker: PASS, FLAKY -test-single-executable-application-use-code-cache: PASS, FLAKY - # https://github.com/nodejs/node/issues/43465 test-http-server-request-timeouts-mixed: PASS, FLAKY @@ -70,24 +46,3 @@ test-tls-psk-client: PASS, FLAKY [$arch==arm] # https://github.com/nodejs/node/issues/49933 test-watch-mode-inspect: SKIP - -[$system==linux && $arch==ppc64] -# https://github.com/nodejs/node/issues/59561 -test-single-executable-application: SKIP -test-single-executable-application-assets: SKIP -test-single-executable-application-assets-raw: SKIP -test-single-executable-application-asset-keys-empty: SKIP -test-single-executable-application-asset-keys: SKIP -test-single-executable-application-disable-experimental-sea-warning: SKIP -test-single-executable-application-empty: SKIP -test-single-executable-application-exec-argv: SKIP -test-single-executable-application-exec-argv-empty: SKIP -test-single-executable-application-exec-argv-extension-cli: SKIP -test-single-executable-application-exec-argv-extension-env: SKIP -test-single-executable-application-exec-argv-extension-none: SKIP -test-single-executable-application-inspect-in-sea-flags: SKIP -test-single-executable-application-inspect: SKIP -test-single-executable-application-snapshot: SKIP -test-single-executable-application-snapshot-and-code-cache: SKIP -test-single-executable-application-snapshot-worker: SKIP -test-single-executable-application-use-code-cache: SKIP From 9e8c7535f2331f767dd4ddc15abd99bf72a61cc5 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 13 Oct 2025 22:57:48 +0200 Subject: [PATCH 2/2] test: skip sea tests on x64 macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's unlikely that anyone would invest in fixing them on x64 macOS in the near future, now that x64 macOS is being phased out. Simply skip them for now. PR-URL: https://github.com/nodejs/node/pull/60250 Refs: https://github.com/nodejs/node/issues/59553 Reviewed-By: Richard Lau Reviewed-By: Ulises Gascรณn Reviewed-By: Yagiz Nizipli Reviewed-By: Darshan Sen --- test/sea/sea.status | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/test/sea/sea.status b/test/sea/sea.status index 936d0b5e899e..56202f356491 100644 --- a/test/sea/sea.status +++ b/test/sea/sea.status @@ -8,25 +8,7 @@ prefix sea [$system==macos && $arch==x64] # https://github.com/nodejs/node/issues/59553 -test-single-executable-application: PASS, FLAKY -test-single-executable-application-assets: PASS, FLAKY -test-single-executable-application-assets-raw: PASS, FLAKY -test-single-executable-application-asset-keys-empty: PASS, FLAKY -test-single-executable-application-asset-keys: PASS, FLAKY -test-single-executable-application-disable-experimental-sea-warning: PASS, FLAKY -test-single-executable-application-empty: PASS, FLAKY -test-single-executable-application-exec-argv: PASS, FLAKY -test-single-executable-application-exec-argv-empty: PASS, FLAKY -test-single-executable-application-exec-argv-extension-cli: PASS, FLAKY -test-single-executable-application-exec-argv-extension-env: PASS, FLAKY -test-single-executable-application-exec-argv-extension-none: PASS, FLAKY -test-single-executable-application-inspect-in-sea-flags: PASS, FLAKY -test-single-executable-application-inspect: PASS, FLAKY -test-single-executable-application-snapshot: PASS, FLAKY -test-single-executable-application-snapshot-and-code-cache: PASS, FLAKY -test-single-executable-application-snapshot-worker: PASS, FLAKY -test-single-executable-application-use-code-cache: PASS, FLAKY - +test-single-executable-application*: SKIP [$system==linux && $arch==ppc64] # https://github.com/nodejs/node/issues/59561