1
2
3
4
5
6
7
8
9
10
11
12
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# Copyright 2006-2017, Matthew Welland.
#
# This file is part of Megatest.
#
# Megatest is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Megatest is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Megatest. If not, see <http://www.gnu.org/licenses/>.
#
# run some tests
BINPATH = $(shell readlink -m $(PWD)/../bin)
LSBR = $(shell lsb_release -sr)
MEGATEST = $(BINPATH)/megatest
MTEST = $(BINPATH)/.$(LSBR)/mtest
DASHBOARD = $(BINPATH)/dashboard
PATH := $(BINPATH):$(PATH)
RUNNAME := $(shell date +w%V.%u.%H.%M)
IPADDR := "-"
RUNID := 1
SERVER =
DEBUG = 1
|
︙ | | |
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
-
+
+
+
+
-
+
|
# The NEWTARGET causes some tests to fail. Do not use until this is fixed.
NEWTARGET = "$(OS)/$(FS)/$(VER)"
TARGET = "ubuntu/nfs/none"
all : build unit test4
# test1 test2 test3 test4 test5 test6 test7 test8 test9
unit : all-rmt.log
unit : all-rmt.log all-api.log
# basicserver.log runs.log misc.log tests.log
# inter dependencies on the unit tests, I wish these could be "suggestions"
all-rmt.log : all-api.log
rel :
cd release;dashboard -rows 25 &
## basicserver.log : unittests/basicserver.scm
## script -c "./rununittest.sh basicserver $(DEBUG)" basicserver.log
%.log : build unittests/%.scm
%.log : build unittests/%.scm $(MTEST)
script -c "./rununittest.sh $* $(DEBUG)" $*.log
if logpro unit.logpro $*.html < $*.log > /dev/null;then echo ALLPASS;else echo ALLFAIL;mv $*.log $*.log.FAIL;fi
server :
cd fullrun;$(MEGATEST) -server - -debug $(DEBUG) -run-id $(RUNID)
stopserver :
|
︙ | | |
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
-
+
|
cd fullrun;sleep 0;$(MEGATEST) -preclean -runtests % -target ubuntu/nfs/sleep1 :runname $(RUNNAME)_ae -debug $(DEBUG) $(LOGGING) > ae.log 2> ae.log &
cd fullrun;sleep 0;$(MEGATEST) -preclean -runtests % -target ubuntu/nfs/sleep10 :runname $(RUNNAME)_ab -debug $(DEBUG) $(LOGGING) > ab.log 2> ab.log &
cd fullrun;sleep 5;$(MEGATEST) -preclean -runtests % -target ubuntu/nfs/sleep60 :runname $(RUNNAME)_ac -debug $(DEBUG) $(LOGGING) > ac.log 2> ac.log &
cd fullrun;sleep 8;$(MEGATEST) -preclean -runtests % -target ubuntu/nfs/sleep240 :runname $(RUNNAME)_ad -debug $(DEBUG) $(LOGGING) > ad.log 2> ad.log &
# cd fullrun;sleep 0;$(MEGATEST) -preclean -runtests % -target $(TARGET) :runname $(RUNNAME)_af -debug $(DEBUG) $(LOGGING) > af.log 2> af.log &
# MUST ADD THIS BACK IN ASAP!!!!
# cd fullrun;sleep 10;$(MEGATEST) -run-wait -target $(TARGET) :runname % -testpatt % :state RUNNING,LAUNCHED,NOT_STARTED,REMOTEHOSTSTART;echo ALL DONE
# cd fullrun;sleep 10;$(MEGATEST) -run-wait -target $(TARGET) :runname % -testpatt % :state RUNNING,LAUNCHED,NOT_STARTED,REMOTEHOSTSTART;echo ALL DONE
test6: fullprep
cd fullrun;$(MEGATEST) -preclean -runtests runfirst -testpatt %/1 -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_itempatt -v
cd fullrun;$(MEGATEST) -preclean -runtests runfirst -testpatt %blahha% -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_itempatt -debug 10
cd fullrun;$(MEGATEST) -rollup :runname newrun -target ubuntu/nfs/none -debug 10
test7:
|
︙ | | |
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
-
+
|
mkdir -p mintest/runs mintest/links
cd mintest;$(MEGATEST) -stop-server 0
cd mintest;$(MEGATEST) -server - -debug $(DEBUG) > server.log 2> server.log &
sleep 3
cd mintest;$(DASHBOARD) -rows 18 &
cleanprep : ../*.scm Makefile */*.config build
mkdir -p fullrun/tmp/mt_runs fullrun/tmp/mt_links /tmp/$(USER)/adisk1
mkdir -p fullrun/tmp/mt_runs fullrun/tmp/mt_links /tmp/$(USER)/adisk1 fullrun/logs
rm -f */logging.db
touch cleanprep
fullprep : cleanprep
cd fullrun;$(MEGATEST) -remove-runs :runname $(RUNNAME)% -target %/%/% -testpatt %/%
cd fullrun;$(BINPATH)/dashboard -rows 15 &
|
︙ | | |