@@ -5916,25 +5916,24 @@ def test_sigaction_default(self, signal, exit_code, assert_identical):
59165916
59175917 @no_windows ('https://github.com/emscripten-core/emscripten/issues/8882' )
59185918 @requires_node
5919- def test_unistd_access (self ):
5919+ @parameterized ({
5920+ '' : (['-DMEMFS' ],),
5921+ 'nodefs' : (['-DNODEFS' , '-lnodefs.js' ],),
5922+ 'noderawfs' : (['-DNODERAWFS' , '-sNODERAWFS' ],)
5923+ })
5924+ def test_unistd_access (self , args ):
59205925 self .uses_es6 = True
5921- orig_compiler_opts = self .emcc_args .copy ()
5922- for fs in ('MEMFS' , 'NODEFS' ):
5923- self .emcc_args = orig_compiler_opts + ['-D' + fs ]
5924- if self .get_setting ('WASMFS' ):
5925- if fs == 'NODEFS' :
5926- # TODO: NODEFS in WasmFS
5927- continue
5928- self .emcc_args += ['-sFORCE_FILESYSTEM' ]
5929- if fs == 'NODEFS' :
5930- self .emcc_args += ['-lnodefs.js' ]
5931- self .do_run_in_out_file_test ('unistd/access.c' )
5926+ self .emcc_args += args
5927+ if self .get_setting ('WASMFS' ):
5928+ if '-DNODEFS' in args or '-DNODERAWFS' in args :
5929+ self .skipTest ('NODEFS in WasmFS' )
5930+ self .emcc_args += ['-sFORCE_FILESYSTEM' ]
5931+
59325932 # Node.js fs.chmod is nearly no-op on Windows
5933- # TODO: NODERAWFS in WasmFS
5934- if not WINDOWS and not self .get_setting ('WASMFS' ):
5935- self .emcc_args = orig_compiler_opts + ['-DNODERAWFS' ]
5936- self .set_setting ('NODERAWFS' )
5937- self .do_run_in_out_file_test ('unistd/access.c' )
5933+ if '-DNODERAWFS' in args and WINDOWS :
5934+ self .skipTest ('NODERAWFS on windows' )
5935+
5936+ self .do_run_in_out_file_test ('unistd/access.c' )
59385937
59395938 def test_unistd_curdir (self ):
59405939 self .uses_es6 = True
0 commit comments