test: skip sea tests in large debug builds

In debug builds, the node binary could exceed 2GB and can not be read by
postject.

PR-URL: https://github.com/nodejs/node/pull/53918
Refs: https://github.com/nodejs/reliability/issues/922
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
Chengzhong Wu 2024-07-23 05:39:48 +08:00 committed by GitHub
parent 4b8000c66c
commit cad73dadba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,6 +50,14 @@ function skipIfSingleExecutableIsNotSupported() {
common.skip('UndefinedBehavior Sanitizer is not supported');
}
try {
readFileSync(process.execPath);
} catch (e) {
if (e.code === 'ERR_FS_FILE_TOO_LARGE') {
common.skip('The Node.js binary is too large to be supported by postject');
}
}
tmpdir.refresh();
// The SEA tests involve making a copy of the executable and writing some fixtures