summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2013-12-12 22:58:26 (GMT)
committerJason Evans <je@fb.com>2013-12-12 22:58:26 (GMT)
commit00a9cc7b6dd04cf8f2e4406cf5262dd8ded315c9 (patch)
tree85368af4168c323d79d13a70b640ae1be1b78084
parent0f4f1efd94d33a4bbf766d3d4e7e349fa7c0d3b9 (diff)
downloadjemalloc-00a9cc7b6dd04cf8f2e4406cf5262dd8ded315c9.zip
jemalloc-00a9cc7b6dd04cf8f2e4406cf5262dd8ded315c9.tar.gz
jemalloc-00a9cc7b6dd04cf8f2e4406cf5262dd8ded315c9.tar.bz2
Streamline test output.
-rw-r--r--test/src/test.c12
-rw-r--r--test/test.sh.in17
2 files changed, 16 insertions, 13 deletions
diff --git a/test/src/test.c b/test/src/test.c
index eb1f5ef..74eb9dc 100644
--- a/test/src/test.c
+++ b/test/src/test.c
@@ -72,11 +72,13 @@ p_test(test_t* t, ...)
}
va_end(ap);
- malloc_printf("tests: %u, pass: %u, skip: %u, fail: %u\n",
- test_count,
- test_counts[test_status_pass],
- test_counts[test_status_skip],
- test_counts[test_status_fail]);
+ malloc_printf("--- %s: %u/%u, %s: %u/%u, %s: %u/%u ---\n",
+ test_status_string(test_status_pass),
+ test_counts[test_status_pass], test_count,
+ test_status_string(test_status_skip),
+ test_counts[test_status_skip], test_count,
+ test_status_string(test_status_fail),
+ test_counts[test_status_fail], test_count);
return (ret);
}
diff --git a/test/test.sh.in b/test/test.sh.in
index 93c1978..a39f99f 100644
--- a/test/test.sh.in
+++ b/test/test.sh.in
@@ -16,16 +16,16 @@ pass_code=0
skip_code=1
fail_code=2
-echo "================================================================================"
pass_count=0
skip_count=0
fail_count=0
for t in $@; do
- echo "${t}:"
- ${t}@exe@ @abs_srcroot@ @abs_objroot@ > @objroot@${t}.out 2>&1
+ if [ $pass_count -ne 0 -o $skip_count -ne 0 -o $fail_count != 0 ] ; then
+ echo
+ fi
+ echo "=== ${t} ==="
+ ${t}@exe@ @abs_srcroot@ @abs_objroot@
result_code=$?
- /bin/echo -n " "
- tail -n 1 @objroot@${t}.out
case ${result_code} in
${pass_code})
pass_count=$((pass_count+1))
@@ -35,15 +35,16 @@ for t in $@; do
;;
${fail_code})
fail_count=$((fail_count+1))
- echo " *** ${t} failure; see @objroot@${t}.out for full output ***" 1>&2
;;
*)
echo "Test harness error" 1>&2
exit 1
esac
done
-echo "================================================================================"
-echo "Test suite summary: pass: ${pass_count}, skip: ${skip_count}, fail: ${fail_count}"
+
+total_count=`expr ${pass_count} + ${skip_count} + ${fail_count}`
+echo
+echo "Test suite summary: pass: ${pass_count}/${total_count}, skip: ${skip_count}/${total_count}, fail: ${fail_count}/${total_count}"
if [ ${fail_count} -eq 0 ] ; then
exit 0