GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: skip sea tests with more accurate available disk space estimation · nodejs/node@bec88ce

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/common
    • sea.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/common/sea.js‎

Copy file name to clipboardExpand all lines: test/common/sea.js
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const fixtures = require('../common/fixtures');
55
const tmpdir = require('../common/tmpdir');
66
const { inspect } = require('util');
77

8-
const { readFileSync, copyFileSync } = require('fs');
8+
const { readFileSync, copyFileSync, statSync } = require('fs');
99
const {
1010
spawnSyncAndExitWithoutError,
1111
} = require('../common/child_process');
@@ -61,9 +61,12 @@ function skipIfSingleExecutableIsNotSupported() {
6161
tmpdir.refresh();
6262

6363
// The SEA tests involve making a copy of the executable and writing some fixtures
64-
// to the tmpdir. To be safe, ensure that at least 120MB disk space is available.
65-
if (!tmpdir.hasEnoughSpace(120 * 1024 * 1024)) {
66-
common.skip('Available disk space < 120MB');
64+
// to the tmpdir. To be safe, ensure that the disk space has at least a copy of the
65+
// executable and some extra space for blobs and configs is available.
66+
const stat = statSync(process.execPath);
67+
const expectedSpace = stat.size + 10 * 1024 * 1024;
68+
if (!tmpdir.hasEnoughSpace(expectedSpace)) {
69+
common.skip(`Available disk space < ${Math.floor(expectedSpace / 1024 / 1024)} MB`);
6770
}
6871
}
6972

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.