From 6b6fad8a99b98717a9b70a16706cc41e64b4cec8 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Thu, 18 Jul 2024 12:00:39 +0100 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. --- 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