Skip to content

Commit e82f062

Browse files
committed
Add @Crossplatform and restrict mkfifo to unix, switch to do_run_in_out_file
1 parent 6becbf1 commit e82f062

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

test/fs/test_nodefs_readdir.out

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
listing contents of dir=/
2+
.
3+
..
4+
tmp
5+
home
6+
dev
7+
proc
8+
listing contents of dir=/working
9+
existing
10+
stdout
11+
test_nodefs_readdir.js
12+
test_nodefs_readdir.wasm
13+
success

test/test_core.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5757,15 +5757,19 @@ def test_fs_nodefs_nofollow(self):
57575757
self.emcc_args += ['-lnodefs.js']
57585758
self.do_runf('fs/test_nodefs_nofollow.c', 'success')
57595759

5760+
@crossplatform
57605761
@requires_node
57615762
def test_fs_nodefs_readdir(self):
57625763
# externally setup an existing folder structure: existing/a
57635764
if self.get_setting('WASMFS'):
57645765
self.set_setting('FORCE_FILESYSTEM')
5765-
os.mkfifo(os.path.join(self.working_dir, 'named_pipe'))
5766+
if not WINDOWS and not MACOS:
5767+
# Add an entry that isn't a directory, file, or link to test that we handle
5768+
# it correctly.
5769+
os.mkfifo(os.path.join(self.working_dir, 'named_pipe'))
57665770
os.makedirs(os.path.join(self.working_dir, 'existing', 'a'))
57675771
self.emcc_args += ['-lnodefs.js']
5768-
self.do_runf('fs/test_nodefs_readdir.c', 'success')
5772+
self.do_run_in_out_file_test('fs/test_nodefs_readdir.c')
57695773

57705774
@no_windows('no symlink support on windows')
57715775
@requires_node

0 commit comments

Comments
 (0)