Skip to content

Commit 0ecd821

Browse files
joyeecheungtargos
authored andcommitted
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: #59488 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent 716750f commit 0ecd821

17 files changed

+114
-29
lines changed

test/wasi/test-wasi-cant_dotdot.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
// Tests test/wasi/wasm/cant_dotdot.wasm, see test/wasi/c/cant_dotdot.c
4+
require('../common');
5+
const { testWasiPreview1 } = require('../common/wasi');
6+
7+
testWasiPreview1(['cant_dotdot']);

test/wasi/test-wasi-clock_getres.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
// Tests test/wasi/wasm/clock_getres.wasm, see test/wasi/c/clock_getres.c
4+
require('../common');
5+
const { testWasiPreview1 } = require('../common/wasi');
6+
7+
// This test is currently unsupported on IBM i PASE
8+
testWasiPreview1(['clock_getres']);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
// Tests test/wasi/wasm/fd_prestat_get_refresh.wasm, see test/wasi/c/fd_prestat_get_refresh.c
4+
require('../common');
5+
const { testWasiPreview1 } = require('../common/wasi');
6+
7+
testWasiPreview1(['fd_prestat_get_refresh']);

test/wasi/test-wasi-ftruncate.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
// Tests test/wasi/wasm/ftruncate.wasm, see test/wasi/c/ftruncate.c
4+
require('../common');
5+
const { testWasiPreview1 } = require('../common/wasi');
6+
7+
testWasiPreview1(['ftruncate']);

test/wasi/test-wasi-getentropy.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
// Tests test/wasi/wasm/getentropy.wasm, see test/wasi/c/getentropy.c
4+
require('../common');
5+
const { testWasiPreview1 } = require('../common/wasi');
6+
7+
testWasiPreview1(['getentropy']);

test/wasi/test-wasi-getrusage.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
// Tests test/wasi/wasm/getrusage.wasm, see test/wasi/c/getrusage.c
4+
require('../common');
5+
const { testWasiPreview1 } = require('../common/wasi');
6+
7+
testWasiPreview1(['getrusage']);

test/wasi/test-wasi-gettimeofday.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
// Tests test/wasi/wasm/gettimeofday.wasm, see test/wasi/c/gettimeofday.c
4+
require('../common');
5+
const { testWasiPreview1 } = require('../common/wasi');
6+
7+
testWasiPreview1(['gettimeofday']);

test/wasi/test-wasi-main_args.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
// Tests test/wasi/wasm/main_args.wasm, see test/wasi/c/main_args.c
4+
require('../common');
5+
const { testWasiPreview1 } = require('../common/wasi');
6+
7+
testWasiPreview1(['main_args']);

test/wasi/test-wasi-notdir.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
// Tests test/wasi/wasm/notdir.wasm, see test/wasi/c/notdir.c
4+
require('../common');
5+
const { testWasiPreview1 } = require('../common/wasi');
6+
7+
testWasiPreview1(['notdir']);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
// Tests test/wasi/wasm/preopen_populates.wasm, see test/wasi/c/preopen_populates.c
4+
require('../common');
5+
const { testWasiPreview1 } = require('../common/wasi');
6+
7+
testWasiPreview1(['preopen_populates']);

0 commit comments

Comments
 (0)