Changes

Jump to: navigation, search

Mozilla BuildBot Trending/Patches

996 bytes added, 18:15, 8 August 2010
m
no edit summary
==Other tests which need to be refined==
http://mxr.mozilla.org/mozilla-central/source/netwerk/test/TestBlockingSocket.cpp
 
==Timestamp Format==
I think it would be a good idea to put my timestamp format in a single place. I plan on using the format <code>YYYYMMDD-HHMMSS</code>. This can be generated with <code> date +%Y%m%d-%H%M%S </code>
 
I am thinking to assist the parser's understanding of log files, it would be a good idea to have these prefixes for each timestamp:
* TOS - Timed Output Start
* TOF - Timed Output Finish
* MLTOS - Multi-Line Output Start
* MLTOF - Multi-Line Output Finish
 
==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:1240:18 27 2009 -0500@@ -210,6 +210,7 8 @@
check::
@$(EXIT_ON_ERROR) \ for f in $(subst .cpp,,$(CPP_UNIT_TESTS)); do \+ export GNUDATE_TIME_FORMAT ; \+ 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/autoconf.mk.in
--- a/js/src/config/autoconf.mk.in Wed Feb 11 14:51:06 2009 +0100
+++ b/js/src/config/autoconf.mk.in Wed Feb 11 11:40:27 2009 -0500
@@ -358,3 +358,4 @@
ENABLE_JIT = @ENABLE_JIT@
NANOJIT_ARCH = @NANOJIT_ARCH@
HAVE_ARM_SIMD= @HAVE_ARM_SIMD@
+
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:1240:18 27 2009 -0500@@ -210,6 +210,7 8 @@
check::
@$(EXIT_ON_ERROR) \ for f in $(subst .cpp,,$(CPP_UNIT_TESTS)); do \+ export GNUDATE_TIME_FORMAT ; \+ 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:1240:18 27 2009 -0500
@@ -77,6 +77,12 @@
testdir=.
+# make sure you are either setting a test directory.
+timefmt="$5"
+if ["x$timefmt" = "x"]; then
+ timefmt=$GNUDATE_TIME_FORMAT
+fi
do
if [ -f $h ]; then
+ echo -n "`date +$timefmt` | "; headfiles="$headfiles -f $h"
fi
done
do
if [ -f $t ]; then
+ echo -n "`date $timefmt` | "; tailfiles="$tailfiles -f $t"
fi
done
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==
+
+ def __init__(self, **kwargs):
+ if not 'platform' not in kwargs:
+ return FAILURE
+ self.platform = kwargs['platform']
+ passCount = 0
+ failCount = 0
+ for line in log.readlines():
+ if "PASS" in line:
+ passCount += passCount + 1
+ if "FAIL" in line:
+ failCount += failCount + 1
+ summary = "TinderboxPrint: TUnit<br/>" + str(passCount) + "/" + str(failCount) + "\n"
+ self.addCompleteLog('summary', summary)
+ failCount = 0
+ knownFailCount = 0
+ for line in log.readlines():
+ if "REFTEST" not in line:
+ continue
+ failCount = 0
+ todoCount = 0
+ for line in log.readlines():
+ if "INFO Passed:" in line:
+ passCount = int(line.split()[-1])
+ failCount = 0
+ todoCount = 0
+ for line in log.readlines():
+ if "INFO Passed:" in line:
+ passCount = int(line.split()[-1])
+ failCount = 0
+ todoCount = 0
+ for line in log.readlines():
+ if "Pass:" in line:
+ passCount = int(line.split()[-1])
+ failCount = 0
+ todoCount = 0
+ for line in log.readlines():
+ if "INFO Passed:" in line:
+ passCount = int(line.split()[-1])
1
edit

Navigation menu