Merge pull request #2939 from aidanhs/aphs-test-only-one-fs
Make tests of different filesystems actually test the different filesystems
This commit is contained in:
Коммит
6a0b4fa30d
|
@ -4554,10 +4554,11 @@ def process(filename):
|
|||
def test_unistd_access(self):
|
||||
self.clear()
|
||||
if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
|
||||
orig_compiler_opts = Building.COMPILER_TEST_OPTS[:]
|
||||
for fs in ['MEMFS', 'NODEFS']:
|
||||
src = open(path_from_root('tests', 'unistd', 'access.c'), 'r').read()
|
||||
expected = open(path_from_root('tests', 'unistd', 'access.out'), 'r').read()
|
||||
Building.COMPILER_TEST_OPTS += ['-D' + fs]
|
||||
Building.COMPILER_TEST_OPTS = orig_compiler_opts + ['-D' + fs]
|
||||
self.do_run(src, expected, js_engines=[NODE_JS])
|
||||
|
||||
def test_unistd_curdir(self):
|
||||
|
@ -4594,10 +4595,11 @@ def process(filename):
|
|||
def test_unistd_truncate(self):
|
||||
self.clear()
|
||||
if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
|
||||
orig_compiler_opts = Building.COMPILER_TEST_OPTS[:]
|
||||
for fs in ['MEMFS', 'NODEFS']:
|
||||
src = open(path_from_root('tests', 'unistd', 'truncate.c'), 'r').read()
|
||||
expected = open(path_from_root('tests', 'unistd', 'truncate.out'), 'r').read()
|
||||
Building.COMPILER_TEST_OPTS += ['-D' + fs]
|
||||
Building.COMPILER_TEST_OPTS = orig_compiler_opts + ['-D' + fs]
|
||||
self.do_run(src, expected, js_engines=[NODE_JS])
|
||||
|
||||
def test_unistd_swab(self):
|
||||
|
@ -4623,14 +4625,16 @@ def process(filename):
|
|||
self.clear()
|
||||
if self.emcc_args is None: return self.skip('requires emcc')
|
||||
if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
|
||||
orig_compiler_opts = Building.COMPILER_TEST_OPTS[:]
|
||||
for fs in ['MEMFS', 'NODEFS']:
|
||||
src = open(path_from_root('tests', 'unistd', 'unlink.c'), 'r').read()
|
||||
Building.COMPILER_TEST_OPTS += ['-D' + fs]
|
||||
Building.COMPILER_TEST_OPTS = orig_compiler_opts + ['-D' + fs]
|
||||
self.do_run(src, 'success', force_c=True, js_engines=[NODE_JS])
|
||||
|
||||
def test_unistd_links(self):
|
||||
self.clear()
|
||||
if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
|
||||
orig_compiler_opts = Building.COMPILER_TEST_OPTS[:]
|
||||
for fs in ['MEMFS', 'NODEFS']:
|
||||
if WINDOWS and fs == 'NODEFS':
|
||||
print >> sys.stderr, 'Skipping NODEFS part of this test for test_unistd_links on Windows, since it would require administrative privileges.'
|
||||
|
@ -4640,7 +4644,7 @@ def process(filename):
|
|||
continue
|
||||
src = open(path_from_root('tests', 'unistd', 'links.c'), 'r').read()
|
||||
expected = open(path_from_root('tests', 'unistd', 'links.out'), 'r').read()
|
||||
Building.COMPILER_TEST_OPTS += ['-D' + fs]
|
||||
Building.COMPILER_TEST_OPTS = orig_compiler_opts + ['-D' + fs]
|
||||
self.do_run(src, expected, js_engines=[NODE_JS])
|
||||
|
||||
def test_unistd_sleep(self):
|
||||
|
@ -4653,19 +4657,21 @@ def process(filename):
|
|||
if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
|
||||
if self.run_name == 'o2': return self.skip('non-asm optimized builds can fail with inline js')
|
||||
if self.emcc_args is None: return self.skip('requires emcc')
|
||||
orig_compiler_opts = Building.COMPILER_TEST_OPTS[:]
|
||||
for fs in ['MEMFS', 'NODEFS']:
|
||||
src = open(path_from_root('tests', 'unistd', 'io.c'), 'r').read()
|
||||
expected = open(path_from_root('tests', 'unistd', 'io.out'), 'r').read()
|
||||
Building.COMPILER_TEST_OPTS += ['-D' + fs]
|
||||
Building.COMPILER_TEST_OPTS = orig_compiler_opts + ['-D' + fs]
|
||||
self.do_run(src, expected, js_engines=[NODE_JS])
|
||||
|
||||
def test_unistd_misc(self):
|
||||
if self.emcc_args is None: return self.skip('requires emcc')
|
||||
if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
|
||||
orig_compiler_opts = Building.COMPILER_TEST_OPTS[:]
|
||||
for fs in ['MEMFS', 'NODEFS']:
|
||||
src = open(path_from_root('tests', 'unistd', 'misc.c'), 'r').read()
|
||||
expected = open(path_from_root('tests', 'unistd', 'misc.out'), 'r').read()
|
||||
Building.COMPILER_TEST_OPTS += ['-D' + fs]
|
||||
Building.COMPILER_TEST_OPTS = orig_compiler_opts + ['-D' + fs]
|
||||
self.do_run(src, expected, js_engines=[NODE_JS])
|
||||
|
||||
def test_posixtime(self):
|
||||
|
|
Загрузка…
Ссылка в новой задаче