@@ -6,6 +6,7 @@ set diff [lindex $argv 0]
6
6
puts " Working on diff $diff "
7
7
if {[string length $diff ]==0} {
8
8
puts stderr " Need DXXXXX argument"
9
+ exit 1
9
10
}
10
11
11
12
# In order for /data/users/$USER to be different than default when creating
@@ -16,6 +17,15 @@ append ::env(USER) "_wdt_contbuild"
16
17
set userdir $::env(USER)
17
18
puts " Will run script with USER env = $userdir "
18
19
20
+ set maxTestDuration " 15m"
21
+ set totalMaxDuration " 35m"
22
+
23
+ puts " Max test duration: $maxTestDuration - Max total $totalMaxDuration "
24
+
25
+ # Set throughput - lower for now / there is some issue with kernel or env
26
+ # (or our code?)
27
+ set ::env(WDT_THROUGHPUT) 13000
28
+
19
29
set CDIR " /data/users/$userdir "
20
30
21
31
# path and ld library path
@@ -49,6 +59,8 @@ proc sleep {time} {
49
59
50
60
# we will email for the first change
51
61
set last {}
62
+ # uncomment to force initial version update after restart
63
+ # set last "force"
52
64
# previous hg log for wdt (will cause email first too)
53
65
set hgprev {none}
54
66
# also email every x :
@@ -86,15 +98,18 @@ nextEmail
86
98
87
99
cd $CDIR /fbsource/fbcode
88
100
101
+ # no auto versioning in this script
89
102
# only 2 types for now - either 'open source' on the mac or full otherwise
90
103
set os [exec uname]
91
104
if {$os == " Darwin" } {
92
105
set type " mac"
93
106
set extraCmds " echo done"
94
107
set targetDir " /usr/local/var/www/wdt_builds/"
95
108
set sudo " "
109
+ set timeoutCmd " gtimeout"
96
110
} else {
97
111
set type " unix"
112
+ set timeoutCmd " timeout"
98
113
set extraCmds " cd $CDIR /fbsource/fbcode &&\
99
114
(sudo tc qdisc del dev lo root; sudo ip6tables --flush || true) &&\
100
115
time fbconfig --clang -r wdt &&\
@@ -103,11 +118,11 @@ if {$os == "Darwin"} {
103
118
time wdt/test/wdt_max_send_test.sh _bin/wdt/fbonly/wdt_fb |& tail -50 &&\
104
119
time fbconfig --sanitize address -r wdt &&\
105
120
time fbmake dbg &&\
106
- time fbmake runtests --run-disabled --return-nonzero-on-timeouts &&\
121
+ time $timeoutCmd $maxTestDuration fbmake runtests --extended-tests -- run-disabled --record-results --return-nonzero-on-timeouts &&\
107
122
sudo tc qdisc add dev lo root netem delay 20ms 10ms \
108
123
duplicate 1% corrupt 0.1% &&\
109
124
echo rerunning tests with tc delays &&\
110
- time fbmake runtests --run-disabled --return-nonzero-on-timeouts &&\
125
+ time $timeoutCmd $maxTestDuration fbmake runtests --run-disabled --record-results --return-nonzero-on-timeouts &&\
111
126
sudo tc qdisc del dev lo root"
112
127
set targetDir " ~/public_html/wdt_builds/"
113
128
set sudo " sudo"
@@ -128,15 +143,16 @@ while {1} {
128
143
set LOGF " $CDIR /$LOGTS .log"
129
144
puts " Logging to $LOGF "
130
145
# cleanup previous builds failure - sudo not needed/asking for passwd on mac
131
- if {[catch {exec sh -c " set -o pipefail; set -x; date; uname -a;\
146
+ if {[catch {exec $timeoutCmd $totalMaxDuration sh -c " set -o pipefail;\
147
+ set -x; date; uname -a;\
132
148
$sudo rm -rf /tmp/wdtTest_$userdir /dev/shm/wdtTest_$userdir wdtTest &&\
133
149
cd $CDIR /fbsource/fbcode && (hg book -d arcpatch-$diff || true) &&\
134
- time hg pull && arc patch $diff &&\
150
+ time hg pull -r master -u --dest master && arc patch $diff &&\
135
151
( time hg rebase -d master || true ) &&\
136
152
hg bookmark -v &&\
137
153
hg log -l 2 && hg log -v -l 1 folly && hg log -v -l 2 wdt &&\
138
154
cd $CDIR /cmake_wdt_build && time make -j 4 && \
139
- CTEST_OUTPUT_ON_FAILURE=1 time make test &&\
155
+ CTEST_OUTPUT_ON_FAILURE=1 time $timeoutCmd $maxTestDuration make test &&\
140
156
$extraCmds " >& $LOGF < /dev/null} results options]} {
141
157
set msg " BAD"
142
158
} else {
0 commit comments