From 660e70e73bd7d0b68d6ba07ffc1ac2fabae053e6 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Fri, 17 Nov 2023 21:00:30 +0100 Subject: [PATCH] test: skip parallel/test-macos-app-sandbox if disk space < 120MB It needs to copy the Node.js binary which is currently almost 100MB. To be safe, skip the test when the available disk space is smaller than 120MB. PR-URL: https://github.com/nodejs/node/pull/50764 Reviewed-By: Debadree Chatterjee Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca --- test/parallel/test-macos-app-sandbox.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/parallel/test-macos-app-sandbox.js b/test/parallel/test-macos-app-sandbox.js index 91485b75983f84..60ad67b3db3790 100644 --- a/test/parallel/test-macos-app-sandbox.js +++ b/test/parallel/test-macos-app-sandbox.js @@ -17,6 +17,10 @@ const nodeBinary = process.execPath; tmpdir.refresh(); +if (!tmpdir.hasEnoughSpace(120 * 1024 * 1024)) { + common.skip('Available disk space < 120MB'); +} + const appBundlePath = tmpdir.resolve('node_sandboxed.app'); const appBundleContentPath = path.join(appBundlePath, 'Contents'); const appExecutablePath = path.join(