@@ -10,6 +10,15 @@ append ::env(USER) "_wdt_contbuild"
10
10
set userdir $::env(USER)
11
11
puts " Will run script with USER env = $userdir "
12
12
13
+ set maxTestDuration " 15m"
14
+ set totalMaxDuration " 35m"
15
+
16
+ puts " Max test duration: $maxTestDuration - Max total $totalMaxDuration "
17
+
18
+ # Set throughput - lower for now / there is some issue with kernel or env
19
+ # (or our code?)
20
+ set ::env(WDT_THROUGHPUT) 13000
21
+
13
22
set CDIR " /data/users/$userdir "
14
23
15
24
# path and ld library path
@@ -43,6 +52,8 @@ proc sleep {time} {
43
52
44
53
# we will email for the first change
45
54
set last {}
55
+ # uncomment to force initial version update after restart
56
+ # set last "force"
46
57
# previous hg log for wdt (will cause email first too)
47
58
set hgprev {none}
48
59
# also email every x :
@@ -80,15 +91,18 @@ nextEmail
80
91
81
92
cd $CDIR /fbsource/fbcode
82
93
94
+
83
95
# only 2 types for now - either 'open source' on the mac or full otherwise
84
96
set os [exec uname]
85
97
if {$os == " Darwin" } {
86
98
set type " mac"
87
99
set extraCmds " echo done"
88
100
set targetDir " /usr/local/var/www/wdt_builds/"
89
101
set sudo " "
102
+ set timeoutCmd " gtimeout"
90
103
} else {
91
104
set type " unix"
105
+ set timeoutCmd " timeout"
92
106
set extraCmds " cd $CDIR /fbsource/fbcode &&\
93
107
(sudo tc qdisc del dev lo root; sudo ip6tables --flush || true) &&\
94
108
time fbconfig --clang -r wdt &&\
@@ -97,11 +111,11 @@ if {$os == "Darwin"} {
97
111
time wdt/test/wdt_max_send_test.sh _bin/wdt/fbonly/wdt_fb |& tail -50 &&\
98
112
time fbconfig --sanitize address -r wdt &&\
99
113
time fbmake dbg &&\
100
- time fbmake runtests --run-disabled --record-results --return-nonzero-on-timeouts &&\
114
+ time $timeoutCmd $maxTestDuration fbmake runtests --run-disabled --record-results --return-nonzero-on-timeouts &&\
101
115
sudo tc qdisc add dev lo root netem delay 20ms 10ms \
102
116
duplicate 1% corrupt 0.1% &&\
103
117
echo rerunning tests with tc delays &&\
104
- time fbmake runtests --run-disabled --record-results --return-nonzero-on-timeouts &&\
118
+ time $timeoutCmd $maxTestDuration fbmake runtests --run-disabled --record-results --return-nonzero-on-timeouts &&\
105
119
sudo tc qdisc del dev lo root"
106
120
set targetDir " ~/public_html/wdt_builds/"
107
121
set sudo " sudo"
@@ -122,12 +136,13 @@ while {1} {
122
136
set LOGF " $CDIR /$LOGTS .log"
123
137
puts " Logging to $LOGF "
124
138
# cleanup previous builds failure - sudo not needed/asking for passwd on mac
125
- if {[catch {exec sh -c " set -o pipefail; set -x; date; uname -a;\
139
+ if {[catch {exec $timeoutCmd $totalMaxDuration sh -c " set -o pipefail;\
140
+ set -x; date; uname -a;\
126
141
$sudo rm -rf /tmp/wdtTest_$userdir /dev/shm/wdtTest_$userdir wdtTest &&\
127
142
cd $CDIR /fbsource/fbcode && time hg pull -u &&\
128
143
hg log -l 1 && hg log -v -l 1 folly && hg log -v -l 1 wdt &&\
129
144
cd $CDIR /cmake_wdt_build && time make -j 4 && \
130
- CTEST_OUTPUT_ON_FAILURE=1 time make test &&\
145
+ CTEST_OUTPUT_ON_FAILURE=1 time $timeoutCmd $maxTestDuration make test &&\
131
146
$extraCmds " >& $LOGF < /dev/null} results options]} {
132
147
set msg " BAD"
133
148
set good 0
0 commit comments