Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbec88ce

Browse files
legendecasmarco-ippolito
authored andcommitted
test: skip sea tests with more accurate available disk space estimation
PR-URL:#53996Reviewed-By: James M Snell <jasnell@gmail.com>Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parente6a4104 commitbec88ce

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎test/common/sea.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const fixtures = require('../common/fixtures');
55
consttmpdir=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+
conststat=statSync(process.execPath);
67+
constexpectedSpace=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)

[8]ページ先頭

©2009-2025 Movatter.jp