Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions test/sea/sea.status
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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*: SKIP

[$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
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spawnSyncAndExitWithoutError(
NODE_DEBUG_NATIVE: 'SEA',
...process.env,
},
cwd: tmpdir.path
cwd: tmpdir.path,
},
{});

Expand All @@ -57,9 +57,9 @@ spawnSyncAndAssert(
env: {
...process.env,
NODE_DEBUG_NATIVE: 'SEA',
}
},
},
{
stdout: /Asset keys: \[\]/,
}
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spawnSyncAndExitWithoutError(
NODE_DEBUG_NATIVE: 'SEA',
...process.env,
},
cwd: tmpdir.path
cwd: tmpdir.path,
},
{});

Expand All @@ -66,9 +66,9 @@ spawnSyncAndAssert(
env: {
...process.env,
NODE_DEBUG_NATIVE: 'SEA',
}
},
},
{
stdout: /Asset keys: \["asset-1\.txt","asset-2\.txt","asset-3\.txt"\]/,
}
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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'),
}
},
},
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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/,
});
}

Expand All @@ -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/,
});
}

Expand Down Expand Up @@ -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));
Expand All @@ -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,
}
},
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ spawnSyncAndAssert(
COMMON_DIRECTORY: join(__dirname, '..', 'common'),
NODE_DEBUG_NATIVE: 'SEA',
...process.env,
}
},
},
{
stdout: 'Hello, world! 😊\n'
stdout: 'Hello, world! 😊\n',
});
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ spawnSyncAndExitWithoutError(
env: {
NODE_DEBUG_NATIVE: 'SEA',
...process.env,
}
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -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/,
});
Original file line number Diff line number Diff line change
Expand Up @@ -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/,
});
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ spawnSyncAndAssert(
NODE_OPTIONS: '--max-old-space-size=512',
COMMON_DIRECTORY: join(__dirname, '..', 'common'),
NODE_DEBUG_NATIVE: 'SEA',
}
},
},
{
stdout: /execArgvExtension env test passed/,
stderr(output) {
assert.doesNotMatch(output, /This warning should not be shown in the output/);
return true;
},
trim: true
trim: true,
});
Original file line number Diff line number Diff line change
Expand Up @@ -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/,
});
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spawnSyncAndAssert(
NODE_NO_WARNINGS: '0',
COMMON_DIRECTORY: join(__dirname, '..', 'common'),
NODE_DEBUG_NATIVE: 'SEA',
}
},
},
{
stdout: /multiple execArgv test passed/,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ writeFileSync(configFile, `
spawnSyncAndExitWithoutError(
process.execPath,
['--experimental-sea-config', 'sea-config.json'],
{ cwd: tmpdir.path }
{ cwd: tmpdir.path },
);

assert(existsSync(seaPrepBlob));
Expand All @@ -65,5 +65,5 @@ spawnSyncAndAssert(
return true;
},
trim: true,
}
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ writeFileSync(configFile, `
spawnSyncAndExitWithoutError(
process.execPath,
['--experimental-sea-config', 'sea-config.json'],
{ cwd: tmpdir.path }
{ cwd: tmpdir.path },
);

assert(existsSync(seaPrepBlob));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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\(\)/,
});
}

Expand Down Expand Up @@ -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));
Expand All @@ -93,7 +93,7 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se
env: {
NODE_DEBUG_NATIVE: 'SEA,MKSNAPSHOT',
...process.env,
}
},
},
{
trim: true,
Expand All @@ -102,7 +102,7 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se
assert.doesNotMatch(
output,
/Single executable application is an experimental feature/);
}
}
},
},
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ spawnSyncAndAssert(
COMMON_DIRECTORY: join(__dirname, '..', 'common'),
NODE_DEBUG_NATIVE: 'SEA',
...process.env,
}
},
},
{
stdout: 'Hello, world! 😊\n'
stdout: 'Hello, world! 😊\n',
});
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ spawnSyncAndAssert(
COMMON_DIRECTORY: join(__dirname, '..', 'common'),
NODE_DEBUG_NATIVE: 'SEA',
...process.env,
}
},
},
{
stdout: 'Hello, world! 😊\n'
stdout: 'Hello, world! 😊\n',
});
Loading
Loading