mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
test: migrate to --build-sea in existing SEA tests
Only leave a smoking test for the postject-based workflow in test-single-executable-application.js PR-URL: https://github.com/nodejs/node/pull/61167 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
17 files changed
+68
-68
No files matched your search
@@ -6,11 +6,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
const tmpdir = require('../common/tmpdir');
|
||||
|
||||
@@ -21,7 +21,7 @@ const fixtures = require('../common/fixtures');
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'asset-keys-empty'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'asset-keys-empty'));
|
||||
|
||||
spawnSyncAndAssert(
|
||||
outputFile,
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
const tmpdir = require('../common/tmpdir');
|
||||
|
||||
@@ -21,7 +21,7 @@ const fixtures = require('../common/fixtures');
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'asset-keys'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'asset-keys'));
|
||||
|
||||
spawnSyncAndAssert(
|
||||
outputFile,
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
require('../common');
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the snapshot support in single executable applications.
|
||||
const tmpdir = require('../common/tmpdir');
|
||||
@@ -17,7 +17,7 @@ const {
|
||||
const fixtures = require('../common/fixtures');
|
||||
|
||||
tmpdir.refresh();
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'assets-raw'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'assets-raw'));
|
||||
|
||||
spawnSyncAndExitWithoutError(
|
||||
outputFile,
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
require('../common');
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
const tmpdir = require('../common/tmpdir');
|
||||
const {
|
||||
@@ -17,7 +17,7 @@ const {
|
||||
const fixtures = require('../common/fixtures');
|
||||
|
||||
tmpdir.refresh();
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'assets'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'assets'));
|
||||
|
||||
spawnSyncAndAssert(
|
||||
outputFile,
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the creation of a single executable application which has the
|
||||
// experimental SEA warning disabled.
|
||||
@@ -19,7 +19,7 @@ const fixtures = require('../common/fixtures');
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'disable-experimental-warning'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'disable-experimental-warning'));
|
||||
|
||||
spawnSyncAndAssert(
|
||||
outputFile,
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
const common = require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the creation of a single executable application with an empty
|
||||
// script.
|
||||
@@ -20,7 +20,7 @@ tmpdir.refresh();
|
||||
|
||||
let outputFile;
|
||||
try {
|
||||
outputFile = generateSEA(fixtures.path('sea', 'empty'), {
|
||||
outputFile = buildSEA(fixtures.path('sea', 'empty'), {
|
||||
verifyWorkflow: true,
|
||||
});
|
||||
} catch (e) {
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the execArgv functionality with empty array in single executable applications.
|
||||
|
||||
@@ -18,7 +18,7 @@ const fixtures = require('../common/fixtures');
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'exec-argv-empty'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'exec-argv-empty'));
|
||||
|
||||
// Test that empty execArgv work correctly
|
||||
spawnSyncAndAssert(
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the execArgvExtension "cli" mode in single executable applications.
|
||||
|
||||
@@ -18,7 +18,7 @@ const fixtures = require('../common/fixtures');
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'exec-argv-extension-cli'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'exec-argv-extension-cli'));
|
||||
|
||||
// Test that --node-options works with execArgvExtension: "cli"
|
||||
spawnSyncAndAssert(
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the execArgvExtension "env" mode (default) in single executable applications.
|
||||
|
||||
@@ -19,7 +19,7 @@ const fixtures = require('../common/fixtures');
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'exec-argv-extension-env'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'exec-argv-extension-env'));
|
||||
|
||||
// Test that NODE_OPTIONS works with execArgvExtension: "env" (default behavior)
|
||||
spawnSyncAndAssert(
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the execArgvExtension "none" mode in single executable applications.
|
||||
|
||||
@@ -18,7 +18,7 @@ const fixtures = require('../common/fixtures');
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'exec-argv-extension-none'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'exec-argv-extension-none'));
|
||||
|
||||
// Test that NODE_OPTIONS is ignored with execArgvExtension: "none"
|
||||
spawnSyncAndAssert(
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the execArgv functionality with multiple arguments in single executable applications.
|
||||
|
||||
@@ -19,7 +19,7 @@ const assert = require('assert');
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'exec-argv'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'exec-argv'));
|
||||
|
||||
// Test that multiple execArgv are properly applied
|
||||
spawnSyncAndAssert(
|
||||
|
||||
@@ -11,15 +11,15 @@ const tmpdir = require('../common/tmpdir');
|
||||
const fixtures = require('../common/fixtures');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'inspect-in-sea-flags'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'inspect-in-sea-flags'));
|
||||
|
||||
// Spawn the SEA with inspect option
|
||||
spawnSyncAndAssert(
|
||||
|
||||
@@ -10,16 +10,16 @@ const tmpdir = require('../common/tmpdir');
|
||||
const fixtures = require('../common/fixtures');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
common.skipIfInspectorDisabled();
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'inspect'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'inspect'));
|
||||
|
||||
// Spawn the SEA with inspect option
|
||||
const seaProcess = spawn(outputFile, [], {
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests "useCodeCache" is ignored when "useSnapshot" is true.
|
||||
|
||||
@@ -20,7 +20,7 @@ const fixtures = require('../common/fixtures');
|
||||
{
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'snapshot-and-code-cache'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'snapshot-and-code-cache'));
|
||||
|
||||
spawnSyncAndAssert(
|
||||
outputFile,
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the snapshot support in single executable applications.
|
||||
|
||||
@@ -20,7 +20,7 @@ const fixtures = require('../common/fixtures');
|
||||
{
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'snapshot-worker'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'snapshot-worker'));
|
||||
|
||||
spawnSyncAndAssert(
|
||||
outputFile,
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the snapshot support in single executable applications.
|
||||
|
||||
@@ -48,7 +48,7 @@ const assert = require('assert');
|
||||
{
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'snapshot'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'snapshot'));
|
||||
|
||||
spawnSyncAndAssert(
|
||||
outputFile,
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
require('../common');
|
||||
|
||||
const {
|
||||
generateSEA,
|
||||
skipIfSingleExecutableIsNotSupported,
|
||||
buildSEA,
|
||||
skipIfBuildSEAIsNotSupported,
|
||||
} = require('../common/sea');
|
||||
|
||||
skipIfSingleExecutableIsNotSupported();
|
||||
skipIfBuildSEAIsNotSupported();
|
||||
|
||||
// This tests the creation of a single executable application which uses the
|
||||
// V8 code cache.
|
||||
@@ -19,7 +19,7 @@ const fixtures = require('../common/fixtures');
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const outputFile = generateSEA(fixtures.path('sea', 'use-code-cache'));
|
||||
const outputFile = buildSEA(fixtures.path('sea', 'use-code-cache'));
|
||||
|
||||
spawnSyncAndAssert(
|
||||
outputFile,
|
||||
|
||||
Reference in new issue
Block a user