* If a subtest fails, mark the build as failed.

svn path=/nixos/trunk/; revision=25474
This commit is contained in:
Eelco Dolstra 2011-01-09 18:56:11 +00:00
parent 7fd8ce0d95
commit b5b7375eea
2 changed files with 12 additions and 7 deletions

View file

@ -100,7 +100,7 @@ sub runTests {
if ($nrTests != 0) {
$log->log("$nrSucceeded out of $nrTests tests succeeded",
($nrSucceeded != $nrTests ? { error => 1 } : { }));
($nrSucceeded < $nrTests ? { error => 1 } : { }));
}
}
@ -126,3 +126,5 @@ END {
runTests;
exit ($nrSucceeded < $nrTests ? 1 : 0);

View file

@ -51,13 +51,9 @@ rec {
''
ensureDir $out/nix-support
LOGFILE=$out/log.xml ${testDriver}/bin/nixos-test-driver ${network}/vms/*/bin/run-*-vm
for i in */coverage-data; do
ensureDir $out/coverage-data
mv $i $out/coverage-data/$(dirname $i)
done
LOGFILE=$out/log.xml ${testDriver}/bin/nixos-test-driver ${network}/vms/*/bin/run-*-vm || failed=1
# Generate a pretty-printed log.
xsltproc --output $out/log.html ${./test-driver/log2html.xsl} $out/log.xml
ln -s ${./test-driver/logfile.css} $out/logfile.css
ln -s ${./test-driver/treebits.js} $out/treebits.js
@ -66,6 +62,13 @@ rec {
touch $out/nix-support/hydra-build-products
echo "report testlog $out log.html" >> $out/nix-support/hydra-build-products
for i in */coverage-data; do
ensureDir $out/coverage-data
mv $i $out/coverage-data/$(dirname $i)
done
[ -z "$failed" ] || touch $out/nix-support/failed
''; # */
};