From 54215e731a987f57ed7729bd1d2812c25d4569dc Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Tue, 23 Jul 2024 05:39:48 +0800 Subject: [PATCH] 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 Reviewed-By: Joyee Cheung --- test/common/sea.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/common/sea.js b/test/common/sea.js index 863047ab36ff48..6de0ea2e4f8a87 100644 --- a/test/common/sea.js +++ b/test/common/sea.js @@ -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