Skip to content

Commit 824dc51

Browse files
committed
[wasm] Use special exitcodes when AOT test build fails, and when it gets oom-killed
1 parent 2bb761b commit 824dc51

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

eng/testing/WasmRunnerAOTTemplate.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,22 @@ function _buildAOTFunc()
3838
dotnet msbuild $binLog -clp:PerformanceSummary -v:q -nologo
3939
if [[ "$(uname -s)" == "Linux" && $buildExitCode -ne 0 ]]; then
4040
echo "\nLast few messages from dmesg:\n"
41-
dmesg | tail -n 20
41+
local lastLines=`dmesg | tail -n 20`
42+
echo $lastLines
43+
44+
if [[ "$lastLines" =~ "oom-kill" ]]; then
45+
return 9200 # OOM
46+
fi
4247
fi
4348

4449
echo
4550
echo
4651

47-
return $buildExitCode
52+
if [[ $buildExitCode -ne 0 ]]; then
53+
return 9100 # aot build failure
54+
fi
55+
56+
return 0
4857
}
4958

5059
# RunCommands defined in tests.mobile.targets

0 commit comments

Comments
 (0)