Skip to content

Commit 3364d20

Browse files
authored
Add @requires_git_checkout decorator. NFC (#24749)
A recent change caused the emscripten-releases roller to break: #24723. This was reverted in #24741 but we should be able to re-land after this change.
1 parent d7206dc commit 3364d20

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

test/test_other.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ def decorated(self, *args, **kwargs):
104104
return decorated
105105

106106

107+
def requires_git_checkout(func):
108+
@wraps(func)
109+
def decorated(self, *args, **kwargs):
110+
if not os.path.exists(utils.path_from_root('.git')):
111+
self.skipTest('test requires git checkout of emscripten')
112+
func(self, *args, **kwargs)
113+
114+
return decorated
115+
116+
107117
def also_with_llvm_libc(f):
108118
assert callable(f)
109119

@@ -16373,8 +16383,8 @@ def test_parsetools_make_removed_fs_assert(self):
1637316383
self.emcc(test_file('hello_world.c'), ['-lidbfs.js'], output_filename='hello_world.js')
1637416384
self.assertNotContained(removed_fs_assert_content, read_file('hello_world.js'))
1637516385

16376-
@is_slow_test
1637716386
@crossplatform
16387+
@requires_git_checkout
1637816388
def test_install(self):
1637916389
self.run_process([PYTHON, path_from_root('tools/install.py'), 'newdir'])
1638016390
self.assertExists('newdir/emcc')

tools/install.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
EXCLUDES = [os.path.normpath(x) for x in '''
2121
test/third_party
2222
tools/maint
23+
tools/install.py
2324
site
2425
node_modules
2526
Makefile

0 commit comments

Comments
 (0)