mirror of
https://github.com/nodejs/node.git
synced 2026-10-10 18:59:49 -04:00
Migrate the remaining SEA tests away from postject. This routes ELF generation through --build-sea, which keeps PT_LOAD segments on separate pages for compatibility with RHEL 8 kernels. Assisted-by: Codex Signed-off-by: Filip Skokan <panva.ip@gmail.com> PR-URL: https://github.com/nodejs/node/pull/65553 Refs: https://github.com/nodejs/build/issues/4433 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
36 lines
737 B
JavaScript
36 lines
737 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
|
|
const {
|
|
buildSEA,
|
|
skipIfBuildSEAIsNotSupported,
|
|
} = require('../common/sea');
|
|
|
|
skipIfBuildSEAIsNotSupported();
|
|
|
|
// This tests the creation of a single executable application.
|
|
|
|
const tmpdir = require('../common/tmpdir');
|
|
const { spawnSyncAndAssert } = require('../common/child_process');
|
|
const { join } = require('path');
|
|
const fixtures = require('../common/fixtures');
|
|
|
|
tmpdir.refresh();
|
|
|
|
const outputFile = buildSEA(fixtures.path('sea', 'simple'));
|
|
|
|
spawnSyncAndAssert(
|
|
outputFile,
|
|
[ '-a', '--b=c', 'd' ],
|
|
{
|
|
env: {
|
|
COMMON_DIRECTORY: join(__dirname, '..', 'common'),
|
|
NODE_DEBUG_NATIVE: 'SEA',
|
|
...process.env,
|
|
},
|
|
},
|
|
{
|
|
stdout: 'Hello, world! 😊\n',
|
|
});
|