File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { readdirSync , statSync } from "fs" ;
2
+ import { join as pathJoin } from "path" ;
3
+ import { runTest } from "./harness" ;
4
+
5
+ describe ( "wasi-test-suite-libstd" , ( ) => {
6
+ const suiteDir = pathJoin ( __dirname , "../../third_party/wasi-test-suite/libstd" ) ;
7
+ const entries = readdirSync ( suiteDir ) ;
8
+ const UNSUPPORTED = [
9
+ "fs_create_dir-new-directory.wasm" ,
10
+ "fs_file_create.wasm" ,
11
+ "fs_metadata-directory.wasm" ,
12
+ "fs_metadata-file.wasm" ,
13
+ "fs_rename-directory.wasm" ,
14
+ "fs_rename-file.wasm" ,
15
+ "env_args-many.wasm" ,
16
+ "env_args-none.wasm" ,
17
+ "env_args-some.wasm" ,
18
+ "env_vars-many.wasm" ,
19
+ ]
20
+
21
+ for ( const entry of entries ) {
22
+ const filePath = pathJoin ( suiteDir , entry )
23
+ const stat = statSync ( filePath ) ;
24
+ if ( ! entry . endsWith ( ".wasm" ) || ! stat . isFile ( ) ) {
25
+ continue ;
26
+ }
27
+ const defineCase = UNSUPPORTED . includes ( entry ) ? it . skip : it ;
28
+ defineCase ( entry , async ( ) => {
29
+ await runTest ( filePath ) ;
30
+ } )
31
+ }
32
+ } )
You can’t perform that action at this time.
0 commit comments