Merge pull request #690 from psychon/make-test-runner-more-robust

Make the functional test runner more robust
This commit is contained in:
Daniel Hahler 2016-02-16 01:03:06 +01:00
commit 9257c96b7c
2 changed files with 6 additions and 2 deletions

View File

@ -79,6 +79,9 @@ runner.run_steps = function(steps)
for _,c in ipairs(client.get()) do
c:kill()
end
if success and result then
io.stderr:write("Test finished successfully\n")
end
awesome.quit()
end) end)
t:start()

View File

@ -169,9 +169,10 @@ for f in $tests; do
# Tail the log and quit, when awesome quits.
tail -n 100000 -f --pid $awesome_pid $awesome_log
if grep -q -E '^Error|assertion failed' $awesome_log; then
if ! grep -q -E '^Test finished successfully$' $awesome_log ||
grep -q -E '[Ee]rror|assertion failed' $awesome_log; then
echo "===> ERROR running $f! <==="
grep --color -o --binary-files=text -E '^Error.*|.*assertion failed.*' $awesome_log
grep --color -o --binary-files=text -E '.*[Ee]rror.*|.*assertion failed.*' $awesome_log
errors=$(expr $errors + 1)
fi
done