Open main menu

CDOT Wiki β

Changes

Mozilla BuildBot Trending/Patches

2,498 bytes added, 11:14, 11 February 2009
no edit summary
==Second attempt at timestamps==
This patch is my second attempt at doing timestamps. This patch lives in the build and test infrastructure instead of BuildBot. The first modification is to test_all.sh to add a parameter to specify the date format for timestamps. It will be the string passed to the terminal program 'date'. You can specify this as a parameter to test_all or by setting an environmental variable "GNUDATE_TIME_FORMAT". I am not modifying test_one.sh because I don't know if it is used in the automated test running, it seems to be there for developer usage. Here is the first stage of my patch
 
<pre>
diff -r 8feaa59e2c54 config/rules.mk
--- a/config/rules.mk Wed Feb 11 14:51:06 2009 +0100
+++ b/config/rules.mk Wed Feb 11 11:12:18 2009 -0500
@@ -210,6 +210,7 @@
check::
@$(EXIT_ON_ERROR) \
for f in $(subst .cpp,,$(CPP_UNIT_TESTS)); do \
+ echo -n "`date $GNUDATE_TIME_FORMAT` | "
XPCOM_DEBUG_BREAK=stack-and-abort $(RUN_TEST_PROGRAM) $(DIST)/bin/$$f; \
done
diff -r 8feaa59e2c54 js/src/config/rules.mk
--- a/js/src/config/rules.mk Wed Feb 11 14:51:06 2009 +0100
+++ b/js/src/config/rules.mk Wed Feb 11 11:12:18 2009 -0500
@@ -210,6 +210,7 @@
check::
@$(EXIT_ON_ERROR) \
for f in $(subst .cpp,,$(CPP_UNIT_TESTS)); do \
+ echo -n "`date $GNUDATE_TIME_FORMAT` | "
XPCOM_DEBUG_BREAK=stack-and-abort $(RUN_TEST_PROGRAM) $(DIST)/bin/$$f; \
done
diff -r 8feaa59e2c54 testing/xpcshell/test_all.sh
--- a/testing/xpcshell/test_all.sh Wed Feb 11 14:51:06 2009 +0100
+++ b/testing/xpcshell/test_all.sh Wed Feb 11 11:12:18 2009 -0500
@@ -77,6 +77,12 @@
testdir=.
fi
+# Set this timestamp format to prepend tests. If you intend to set this
+# make sure you are either setting a test directory.
+timefmt="$5"
+if ["x$timefmt" = "x"]; then
+ timefmt=$GNUDATE_TIME_FORMAT
+fi
###############################
# SETUP FOR RUNNING THE TESTS #
@@ -90,6 +96,7 @@
for h in $testdir/head_*.js
do
if [ -f $h ]; then
+ echo -n "`date +$timefmt` | "
headfiles="$headfiles -f $h"
fi
done
@@ -101,6 +108,7 @@
for t in $testdir/tail_*.js
do
if [ -f $t ]; then
+ echo -n "`date $timefmt` | "
tailfiles="$tailfiles -f $t"
fi
done
@@ -112,6 +120,7 @@
for t in $testdir/test_*.js
do
+ echo -n "`date +$timefmt` | "
NATIVE_TOPSRCDIR="$native_topsrcdir" TOPSRCDIR="$topsrcdir" $xpcshell -j -s $headfiles -f $t $tailfiles 2> $t.log 1>&2
rv="$?"
if [ ! "$rv" = "0" -o \
</pre>
 
 
 
==First attempt at timestamps==
This patch can be applied to buildbot-0.7.9 to enable build-logs to use the format
1
edit