Commit 8703ac3a authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[gcmole] Propagate errors during test run

The bot that runs gcmole was failing before
https://crrev.com/c/1789707 because the test file was missing.
It returned with exit status 0 anyway though. After fixing the
original fault, this CL ensures that the gcmole tests also
trigger an error on the bot(s) if they fail.

R=mstarzinger@chromium.org
CC=​​mslekova@chromium.org

Change-Id: I29ae40301062baadfcd38b26c336c5749924b0d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1789702
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63612}
parent d61dcb84
...@@ -467,6 +467,10 @@ end ...@@ -467,6 +467,10 @@ end
local function TestRun() local function TestRun()
local errors, output = SafeCheckCorrectnessForArch('x64', true) local errors, output = SafeCheckCorrectnessForArch('x64', true)
if not errors then
log("** Test file should produce errors, but none were found.")
return false
end
local filename = "tools/gcmole/test-expectations.txt" local filename = "tools/gcmole/test-expectations.txt"
local exp_file = assert(io.open(filename), "failed to open test expectations file") local exp_file = assert(io.open(filename), "failed to open test expectations file")
...@@ -474,18 +478,18 @@ local function TestRun() ...@@ -474,18 +478,18 @@ local function TestRun()
if output ~= expectations then if output ~= expectations then
log("** Output mismatch from running tests. Please run them manually.") log("** Output mismatch from running tests. Please run them manually.")
else return false
log("** Tests ran successfully")
end end
end
TestRun() log("** Tests ran successfully")
return true
end
local errors = false local errors = not TestRun()
for _, arch in ipairs(ARCHS) do for _, arch in ipairs(ARCHS) do
if not ARCHITECTURES[arch] then if not ARCHITECTURES[arch] then
error ("Unknown arch: " .. arch) error("Unknown arch: " .. arch)
end end
errors = SafeCheckCorrectnessForArch(arch, false) or errors errors = SafeCheckCorrectnessForArch(arch, false) or errors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment