mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
* If a subtest fails, mark the build as failed.
svn path=/nixos/trunk/; revision=25474
This commit is contained in:
parent
7fd8ce0d95
commit
b5b7375eea
2 changed files with 12 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
''; # */
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue