From 20b8258e6839d110deda224b9f4c89e02f8bd7de Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 9 Jan 2011 21:37:01 +0000 Subject: [PATCH] * Handle the case where a machine produces no coverage data. svn path=/nixos/trunk/; revision=25477 --- lib/testing.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/testing.nix b/lib/testing.nix index 1cc237cba9d5..c7acbfa13c1a 100644 --- a/lib/testing.nix +++ b/lib/testing.nix @@ -77,11 +77,11 @@ rec { # runTests. makeReport = x: runCommand "report" { buildInputs = [rsync]; } '' + mkdir -p $TMPDIR/gcov/ + for d in ${x}/coverage-data/*; do - echo "doing $d" - - ensureDir $TMPDIR/gcov/ + [ -n "$(ls -A "$d")" ] || continue for i in $(cd $d/nix/store && ls); do if ! test -e $TMPDIR/gcov/nix/store/$i; then