| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e6a4104 commit bec88ce
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ const fixtures = require('../common/fixtures'); | |||
| 5 | 5 | const tmpdir = require('../common/tmpdir'); | |
| 6 | 6 | const { inspect } = require('util'); | |
| 7 | 7 | ||
| 8 | - const { readFileSync, copyFileSync } = require('fs'); | ||
| 8 | + const { readFileSync, copyFileSync, statSync } = require('fs'); | ||
| 9 | 9 | const { | |
| 10 | 10 | spawnSyncAndExitWithoutError, | |
| 11 | 11 | } = require('../common/child_process'); | |
@@ -61,9 +61,12 @@ function skipIfSingleExecutableIsNotSupported() { | |||
| 61 | 61 | tmpdir.refresh(); | |
| 62 | 62 | ||
| 63 | 63 | // 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`); | ||
| 67 | 70 | } | |
| 68 | 71 | } | |
| 69 | 72 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments