mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
test: split test-wasi.js
There is a flake in the tests. Split them so that people stop piling more test cases that flake the monolith. PR-URL: https://github.com/nodejs/node/pull/59488 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
parent
7c9c981d27
commit
d55643d6fc
7
test/wasi/test-wasi-cant_dotdot.js
Normal file
7
test/wasi/test-wasi-cant_dotdot.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/cant_dotdot.wasm, see test/wasi/c/cant_dotdot.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['cant_dotdot']);
|
||||
8
test/wasi/test-wasi-clock_getres.js
Normal file
8
test/wasi/test-wasi-clock_getres.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/clock_getres.wasm, see test/wasi/c/clock_getres.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
// This test is currently unsupported on IBM i PASE
|
||||
testWasiPreview1(['clock_getres']);
|
||||
7
test/wasi/test-wasi-fd_prestat_get_refresh.js
Normal file
7
test/wasi/test-wasi-fd_prestat_get_refresh.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/fd_prestat_get_refresh.wasm, see test/wasi/c/fd_prestat_get_refresh.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['fd_prestat_get_refresh']);
|
||||
7
test/wasi/test-wasi-ftruncate.js
Normal file
7
test/wasi/test-wasi-ftruncate.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/ftruncate.wasm, see test/wasi/c/ftruncate.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['ftruncate']);
|
||||
7
test/wasi/test-wasi-getentropy.js
Normal file
7
test/wasi/test-wasi-getentropy.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/getentropy.wasm, see test/wasi/c/getentropy.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['getentropy']);
|
||||
7
test/wasi/test-wasi-getrusage.js
Normal file
7
test/wasi/test-wasi-getrusage.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/getrusage.wasm, see test/wasi/c/getrusage.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['getrusage']);
|
||||
7
test/wasi/test-wasi-gettimeofday.js
Normal file
7
test/wasi/test-wasi-gettimeofday.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/gettimeofday.wasm, see test/wasi/c/gettimeofday.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['gettimeofday']);
|
||||
7
test/wasi/test-wasi-main_args.js
Normal file
7
test/wasi/test-wasi-main_args.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/main_args.wasm, see test/wasi/c/main_args.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['main_args']);
|
||||
7
test/wasi/test-wasi-notdir.js
Normal file
7
test/wasi/test-wasi-notdir.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/notdir.wasm, see test/wasi/c/notdir.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['notdir']);
|
||||
7
test/wasi/test-wasi-preopen_populates.js
Normal file
7
test/wasi/test-wasi-preopen_populates.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/preopen_populates.wasm, see test/wasi/c/preopen_populates.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['preopen_populates']);
|
||||
7
test/wasi/test-wasi-pthread.js
Normal file
7
test/wasi/test-wasi-pthread.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/pthread.wasm, see test/wasi/c/pthread.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['--target=wasm32-wasip1-threads', 'pthread']);
|
||||
7
test/wasi/test-wasi-readdir.js
Normal file
7
test/wasi/test-wasi-readdir.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/readdir.wasm, see test/wasi/c/readdir.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['readdir']);
|
||||
7
test/wasi/test-wasi-sock.js
Normal file
7
test/wasi/test-wasi-sock.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/sock.wasm, see test/wasi/c/sock.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['sock']);
|
||||
7
test/wasi/test-wasi-stat.js
Normal file
7
test/wasi/test-wasi-stat.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/stat.wasm, see test/wasi/c/stat.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['stat']);
|
||||
7
test/wasi/test-wasi-write_file.js
Normal file
7
test/wasi/test-wasi-write_file.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// Tests test/wasi/wasm/write_file.wasm, see test/wasi/c/write_file.c
|
||||
require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
testWasiPreview1(['write_file']);
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
'use strict';
|
||||
const common = require('../common');
|
||||
const { testWasiPreview1 } = require('../common/wasi');
|
||||
|
||||
// TODO(joyeecheung): tests that don't need special configurations can be ported
|
||||
// to a special python test case configuration and get run in parallel.
|
||||
// Tests that are currently unsupported on IBM i PASE.
|
||||
if (!common.isIBMi) {
|
||||
testWasiPreview1(['clock_getres']);
|
||||
testWasiPreview1(['getrusage']);
|
||||
}
|
||||
|
||||
// Tests that are currently unsupported on Windows and Android.
|
||||
if (!common.isWindows && process.platform !== 'android') {
|
||||
testWasiPreview1(['readdir']);
|
||||
}
|
||||
|
||||
testWasiPreview1(['cant_dotdot']);
|
||||
testWasiPreview1(['fd_prestat_get_refresh']);
|
||||
testWasiPreview1(['ftruncate']);
|
||||
testWasiPreview1(['getentropy']);
|
||||
testWasiPreview1(['gettimeofday']);
|
||||
testWasiPreview1(['main_args']);
|
||||
testWasiPreview1(['notdir']);
|
||||
testWasiPreview1(['preopen_populates']);
|
||||
testWasiPreview1(['stat']);
|
||||
testWasiPreview1(['sock']);
|
||||
testWasiPreview1(['write_file']);
|
||||
testWasiPreview1(['--target=wasm32-wasip1-threads', 'pthread']);
|
||||
|
|
@ -6,3 +6,11 @@ prefix wasi
|
|||
|
||||
[true] # This section applies to all platforms
|
||||
|
||||
[$system==ibmi]
|
||||
# Unsupported on IBM i PASE
|
||||
test-wasi-clock_getres: SKIP
|
||||
test-wasi-getrusage: SKIP
|
||||
|
||||
[$system==win32 || $system==android]
|
||||
# Unsupported on Windows and Android
|
||||
test-wasi-readdir: SKIP
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user