Skip to content

Commit

Permalink
Speculative test fix to exclude Wasm tests on watchOS.
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=273881
rdar://127701918

Reviewed by Keith Miller and Yusuke Suzuki.

1. Change the microbenchmark to exit early if Wasm is not supported.
2. Change test harnesses to detect watchOS properly.
3. Skip Wasm tests when JIT is not supported.

* JSTests/microbenchmarks/wasm-cc-int-to-int.js:
* Tools/Scripts/run-javascriptcore-tests:
(configurationForUpload):
* Tools/Scripts/run-jsc-stress-tests:

Canonical link: https://commits.webkit.org/278528@main
  • Loading branch information
Mark Lam committed May 8, 2024
1 parent fe9b00c commit ad76f5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions JSTests/microbenchmarks/wasm-cc-int-to-int.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
//@runDefault("--useWebAssembly=1")

if (typeof WebAssembly == "undefined")
$vm.exit();

var wasm_code;
try {
wasm_code = read('../../JSTests/microbenchmarks/wasm-cc-int-to-int.wasm', 'binary')
Expand Down
2 changes: 1 addition & 1 deletion Tools/Scripts/run-javascriptcore-tests
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ sub configurationForUpload()
if (!$version) {
$version = iosVersion();
}
} elsif (index($model, 'watch') != -1 || index(xcodeSDKPlatformName(), "watch") != -1) {
} elsif (index(lc($model), 'watch') != -1 || index(lc(xcodeSDKPlatformName()), "watch") != -1) {
$platform = 'watchos';
die "No watchOS version specified" if !$version;
} elsif (index(xcodeSDKPlatformName(), "appletv") != -1) {
Expand Down
2 changes: 1 addition & 1 deletion Tools/Scripts/run-jsc-stress-tests
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ $hostOS = determineOS unless $hostOS
$architecture = determineArchitecture unless $architecture
$isFTLPlatform = !($architecture == "x86" || $architecture == "arm" || $architecture == "mips" || $architecture == "riscv64" || $hostOS == "windows" || $hostOS == "playstation")
# Special case armv7 and windows, we want to run the wasm tests temporarily without B3/Air support
$isWasmPlatform = (not $cloop) && ($isFTLPlatform || $architecture == "arm" || ($hostOS == "windows" && $architecture == "x86_64"))
$isWasmPlatform = (not $cloop) && $jitTests && ($isFTLPlatform || $architecture == "arm" || ($hostOS == "windows" && $architecture == "x86_64"))
$isSIMDPlatform = $isWasmPlatform && ($architecture == "arm64" || $architecture == "x86_64")

# This is meant for skipping execution of tests than require a lot of address
Expand Down

0 comments on commit ad76f5b

Please sign in to comment.