Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/test_sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
path_from_root,
test_file,
)
from decorators import crossplatform, parameterized, with_env_modify
from decorators import crossplatform, no_windows, parameterized, with_env_modify

from tools import cache, ports, response_file, shared, utils
from tools.config import EM_CONFIG
Expand Down Expand Up @@ -238,6 +238,7 @@ def make_new_executable(name):
finally:
delete_file(default_config)

@no_windows('Test relies on Unix-specific make_fake_tool')
def test_llvm(self):
LLVM_WARNING = 'LLVM version for clang executable'

Expand Down Expand Up @@ -423,6 +424,7 @@ def test_cache_clearing_manual(self):
self.assertIn(SANITY_MESSAGE, output)
self.assertCacheEmpty()

@no_windows('Test relies on Unix-specific make_fake_tool')
def test_cache_clearing_auto(self):
# Changing LLVM_ROOT, even without altering .emscripten, clears the cache
restore_and_set_up()
Expand Down Expand Up @@ -640,6 +642,7 @@ def test():
build()
test()

@no_windows('Test relies on Unix-specific make_fake_tool')
def test_vanilla(self):
restore_and_set_up()
self.clear_cache()
Expand All @@ -664,6 +667,7 @@ def test_with_fake(report, expected):
test_with_fake('got js backend! JavaScript (asm.js, emscripten) backend', 'LLVM has not been built with the WebAssembly backend')
delete_dir(shared.CANONICAL_TEMP_DIR)

@no_windows('Test relies on Unix-specific make_fake_tool')
def test_llvm_add_version(self):
restore_and_set_up()

Expand All @@ -690,6 +694,7 @@ def test_required_config_settings(self):
open(EM_CONFIG, 'a').write('\ndel BINARYEN_ROOT\n')
self.check_working([EMCC, test_file('hello_world.c')], 'BINARYEN_ROOT not set in config (%s), and `wasm-opt` not found in PATH' % EM_CONFIG)

@no_windows('Test relies on Unix-specific make_fake_tool')
def test_empty_config(self):
restore_and_set_up()
make_fake_tool(self.in_dir('fake', 'wasm-opt'), 'foo')
Expand All @@ -700,6 +705,7 @@ def test_empty_config(self):
with env_modify({'PATH': self.in_dir('fake') + os.pathsep + os.environ['PATH']}):
self.check_working([EMCC])

@no_windows('Test relies on Unix-specific make_fake_tool')
def test_missing_config(self):
restore_and_set_up()
make_fake_tool(self.in_dir('fake', 'wasm-opt'), 'foo')
Expand Down Expand Up @@ -787,6 +793,7 @@ def test_embuilder_transitive_pic(self):
self.run_process([EMBUILDER, '--pic', 'clear', 'sdl2*'])
self.run_process([EMCC, '-sMAIN_MODULE=2', '-sUSE_SDL=2', '-sUSE_SDL_GFX=2', test_file('hello_world.c')])

@no_windows('Test relies on Unix-specific make_fake_tool')
def test_binaryen_version(self):
restore_and_set_up()
with open(EM_CONFIG, 'a') as f:
Expand Down