Files
node/test/sea/test-single-executable-application.js
Filip Skokan c3035a4ea1 test: use native builder for legacy SEA tests
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>
2026-08-29 00:59:36 +02:00

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',
});