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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
-
+
-
+
-
-
-
-
-
|
#
# run some tests
BINPATH=$(shell readlink -m $(PWD)/../bin)
MEGATEST=$(BINPATH)/megatest
DASHBOARD=$(BINPATH)/dashboard
PATH := $(BINPATH):$(PATH)
RUNNAME := $(shell date +w%V.%u.%H.%M)
IPADDR := "-"
# Set SERVER to "-server -"
SERVER =
DEBUG = 1
LOGGING =
BINPATH = $(shell readlink -m $(PWD)/../bin)
MEGATEST = $(BINPATH)/megatest
DASHBOARD = $(BINPATH)/dashboard
PATH := $(BINPATH):$(PATH)
RUNNAME := $(shell date +w%V.%u.%H.%M)
IPADDR := "-"
RUNID := 1
SERVER =
DEBUG = 1
LOGGING =
ROWS = 20
OS = $(shell grep ID /etc/*-release|cut -d= -f2)
FS = $(shell df -T .|tail -1|awk '{print $$2}')
VER = $(shell fsl info|grep checkout|awk '{print $$2}'|cut -c 1-5)
# The NEWTARGET causes some tests to fail. Do not use until this is fixed.
NEWTARGET = "$(OS)/$(FS)/$(VER)"
TARGET = "ubuntu/nfs/none"
all : test1 test2 test3 test4 test5 test6 test7 test8 test9
all : unit test1 test2 test3 test4 test5 test6 test7 test8 test9
unit :
./rununittest.sh basicserver $(DEBUG)
server :
cd ..;make -j;make install
cd fullrun;$(MEGATEST) -server - -debug 22
cd fullrun;$(MEGATEST) -server - -debug $(DEBUG) -run-id $(RUNID)
stopserver :
cd ..;make -j && make install
cd fullrun;$(MEGATEST) -stop-server 0
repl :
cd ..;make -j && make install
cd fullrun;$(MEGATEST) -repl
cd fullrun;$(MEGATEST) -:b -repl
test0 : cleanprep
cd simplerun ; $(MEGATEST) -server - -debug $(DEBUG)
test1 : cleanprep
rm -f simplerun/megatest.db
rm -rf simplelinks/ simpleruns/
mkdir -p simplelinks simpleruns
cd simplerun;cp ../../*_records.scm .;perl -pi.bak -e 's/define-inline/define/' *_records.scm
cd simplerun;echo '(load "../tests.scm")' | $(MEGATEST) -repl -debug $(DEBUG)
test2 : fullprep
cd fullrun;$(MEGATEST) -preclean -runtests ez_pass,runfirst/a/% -reqtarg ubuntu/nfs/none :runname $(RUNNAME) -debug $(DEBUG) $(LOGGING)
cd fullrun;megatest -preclean -runtests % -target ubuntu/nfs/none :runname $(RUNNAME)_01 -testpatt %/,%/ai -debug $(DEBUG)
cd fullrun;megatest -preclean -runtests %/,%/ai -target ubuntu/nfs/none :runname $(RUNAME)_02 -debug $(DEBUG)
cd fullrun;megatest -preclean -runtests runfirst/%,%/ai -target ubuntu/nfs/none :runname $(RUNNAME)_02 -debug $(DEBUG)
cd fullrun;megatest -runtests %/,%/winter -target ubuntu/nfs/none :runname $(RUNNAME)_03 -debug $(DEBUG)
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
+
-
+
|
cd fullrun;time $(MEGATEST) -debug $(DEBUG) -run-wait -runtests % -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_b -m "This is a comment specific to a run" -v $(LOGGING)
test4a : cleanprep
cd fullrun;time $(MEGATEST) -debug $(DEBUG) -preclean -runtests all_toplevel -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_b -m "This is a comment specific to a run" -v $(LOGGING)
# NOTE: Only one instance can be a server
test5 : cleanprep
rm -f fullrun/a*.log fullrun/logs/*
@echo "WARNING: No longer running fullprep, test converage may be lessened"
cd fullrun;sleep 0;$(MEGATEST) -preclean -runtests % -target $(TARGET) :runname $(RUNNAME)_aa -debug $(DEBUG) $(LOGGING) > aa.log 2> aa.log &
cd fullrun;sleep 0;$(MEGATEST) -preclean -runtests % -target $(TARGET) :runname $(RUNNAME)_ab -debug $(DEBUG) $(LOGGING) > ab.log 2> ab.log &
cd fullrun;sleep 5;$(MEGATEST) -preclean -runtests % -target $(TARGET) :runname $(RUNNAME)_ac -debug $(DEBUG) $(LOGGING) > ac.log 2> ac.log &
cd fullrun;sleep 8;$(MEGATEST) -preclean -runtests % -target $(TARGET) :runname $(RUNNAME)_ad -debug $(DEBUG) $(LOGGING) > ad.log 2> ad.log &
# cd fullrun;sleep 0;$(MEGATEST) -preclean -runtests % -target $(TARGET) :runname $(RUNNAME)_ae -debug $(DEBUG) $(LOGGING) > ae.log 2> ae.log &
# cd fullrun;sleep 0;$(MEGATEST) -preclean -runtests % -target $(TARGET) :runname $(RUNNAME)_af -debug $(DEBUG) $(LOGGING) > af.log 2> af.log & a
# 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
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
|
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+
|
# Some simple checks for bootstrapping and run loop logic
test9 : minsetup test9a test9b test9c test9d test9e
test9a :
@echo Run super-simple mintest e, no waitons.
cd mintest;$(DASHBOARD)&
cd mintest;megatest -preclean -runtests e -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)
cd mintest;$(MEGATEST) -preclean -runtests e -target $(VER) -runname $(shell date +%H.%M.%S) -debug $(DEBUG)
test9b :
@echo Run simple mintest d with one waiton c
cd mintest;megatest -preclean -runtests d -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)
cd mintest;$(MEGATEST) -preclean -runtests d -target $(VER) -runname `date +%H.%M.%S` -debug $(DEBUG)
test9c :
@echo Run mintest a with full waiton chain a -> b -> c -> d -> e
cd mintest;megatest -preclean -runtests a -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)
cd mintest;$(MEGATEST) -preclean -runtests a -target $(VER) -runname `date +%H.%M.%S` -debug $(DEBUG)
test9d :
@echo Run an itemized test with no items
cd mintest;megatest -preclean -runtests g -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)
cd mintest;$(MEGATEST) -preclean -runtests g -target $(VER) -runname `date +%H.%M.%S` -debug $(DEBUG)
test9e :
@echo Run mintest a1 with full waiton chain with d1fail: a1 -> b1 -> c1 -> d1fail -> e1
cd mintest;megatest -preclean -runtests a1 -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)
cd mintest;$(MEGATEST) -preclean -runtests a1 -target $(VER) -runname `date +%H.%M.%S` -debug $(DEBUG)
test10 :
@echo Run a bunch of different targets simultaneously
(cd fullrun;$(MEGATEST) -server - ;sleep 2)&
for targ in mint/btrfs/mintdir sunos/sshfs/loc; do \
(cd fullrun;$(MEGATEST) -preclean -runtests priority_10_waiton_1 -target $$targ :runname $(RUNNAME) &); done
for sys in ubuntu suse redhat debian;do \
for fs in afs nfs zfs; do \
for dpath in none tmp; do \
(cd fullrun;$(MEGATEST) -preclean -runtests priority_10_waiton_1 -target $$sys/$$fs/$$dpath :runname $(RUNNAME) &);\
done;done;done
test11 :
cd fullrun;time (for a in 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 ;do (megatest -test-paths -target %/%/% > /dev/null ) & done; wait; )
minsetup :
cd ..;make -j && make install
mkdir -p mintest/runs mintest/links
cd mintest;megatest -stop-server 0
cd mintest;megatest -server - -debug $(DEBUG) > server.log 2> server.log &
cd mintest;$(MEGATEST) -stop-server 0
cd mintest;$(MEGATEST) -server - -debug $(DEBUG) > server.log 2> server.log &
sleep 3
cd mintest;dashboard -rows 18 &
cd mintest;$(DASHBOARD) -rows 18 &
cleanprep : ../*.scm Makefile */*.config
mkdir -p fullrun/tmp/mt_runs fullrun/tmp/mt_links
cd ..;make -j;make install
rm -f */logging.db
touch cleanprep
fullprep : cleanprep
cd fullrun;$(MEGATEST) -remove-runs :runname $(RUNNAME)% -target %/%/% -testpatt %/%
cd fullrun;$(BINPATH)/dashboard -rows 15 &
dashboard : cleanprep
cd fullrun && $(BINPATH)/dashboard -transport fs -rows 20 &
cd fullrun && $(BINPATH)/dashboard -rows $(ROWS) &
dashboard-http : cleanprep
cd fullrun && $(BINPATH)/dashboard -transport http -rows 20 &
newdashboard : cleanprep
cd fullrun && $(BINPATH)/newdashboard &
remove :
cd fullrun;$(MEGATEST) -remove-runs :runname $(RUN) -testpatt % -itempatt % :sysname % :fsname % :datapath %
clean :
rm cleanprep
kill :
killall -v mtest main.sh dboard || true
rm -f */megatest.db */logging.db */monitor.db || true
rm -rf /tmp/.$(USER)-portlogger.db *run/db/* */megatest.db */logging.db */monitor.db fullrun/tmp/mt_*/* fullrun/tmp/mt_*/.db* fullrun/logs/*.log fullrun/*.log || true
killall -v mtest dboard || true
hardkill : kill
sleep 5;killall -v mtest main.sh dboard -9
sleep 2;killall -v mtest main.sh dboard -9
listservers :
cd fullrun;$(MEGATEST) -list-servers
runforever :
while(ls); do runname=`date +%F-%R:%S`;(cd fullrun;$(MEGATEST) -runall -target ubuntu/nfs/none :runname $$runname;/home/matt/data/megatest/megatest -runall -target ubuntu/nfs/none :runname $$runname;/home/matt/data/megatest/megatest -runall -target ubuntu/nfs/none :runname $$runname);done
|