Patchwork [5/5,v2] tests: Print out list of failed tests

login
register
mail settings
Submitter Lukas Czerner
Date Aug. 12, 2011, 4:43 p.m.
Message ID <1313167380-3283-5-git-send-email-lczerner@redhat.com>
Download mbox | patch
Permalink /patch/109874/
State Accepted
Headers show

Comments

Lukas Czerner - Aug. 12, 2011, 4:43 p.m.
Currently we need to grep, list or just search for failed tests when
running 'make check' which is annoying. This commit simply prints out
the list of failed test names at the end of the output.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
v2: This is the actually the first version of the patch

 tests/test_script.in |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
Theodore Ts'o - Sept. 16, 2011, 3:56 a.m.
On Fri, Aug 12, 2011 at 06:43:00PM +0200, Lukas Czerner wrote:
> Currently we need to grep, list or just search for failed tests when
> running 'make check' which is annoying. This commit simply prints out
> the list of failed test names at the end of the output.
> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>

Thanks, applied to the next branch.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/tests/test_script.in b/tests/test_script.in
index cec09df..b7ac86e 100644
--- a/tests/test_script.in
+++ b/tests/test_script.in
@@ -78,4 +78,12 @@  num_failed=`ls *.failed 2>/dev/null | wc -l`
 
 echo "$num_ok tests succeeded	$num_failed tests failed"
 
-test "$num_failed" -eq 0 || exit 1
+test "$num_failed" -eq 0 && exit 0
+
+echo -n "Tests failed: "
+for fname in $(ls *.failed); do
+	echo -n "${fname%%.failed} "
+done
+echo ""
+
+exit 1