diff --git a/eng/testing/WasmRunnerAOTTemplate.sh b/eng/testing/WasmRunnerAOTTemplate.sh index 6922b550551b8..af3e499f457c5 100644 --- a/eng/testing/WasmRunnerAOTTemplate.sh +++ b/eng/testing/WasmRunnerAOTTemplate.sh @@ -38,13 +38,22 @@ function _buildAOTFunc() dotnet msbuild $binLog -clp:PerformanceSummary -v:q -nologo if [[ "$(uname -s)" == "Linux" && $buildExitCode -ne 0 ]]; then echo "\nLast few messages from dmesg:\n" - dmesg | tail -n 20 + local lastLines=`dmesg | tail -n 20` + echo $lastLines + + if [[ "$lastLines" =~ "oom-kill" ]]; then + return 9200 # OOM + fi fi echo echo - return $buildExitCode + if [[ $buildExitCode -ne 0 ]]; then + return 9100 # aot build failure + fi + + return 0 } # RunCommands defined in tests.mobile.targets diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 766d862dda49f..29a33928240f2 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -14,6 +14,8 @@ + +