Get rid of shell boilerplate in smoke test Empire batch files

This commit is contained in:
Markus Armbruster 2012-07-14 16:38:15 +02:00
parent 49b2b13a90
commit 56a9d46ab1
47 changed files with 1 additions and 185 deletions

View file

@ -87,7 +87,7 @@ EOF
then c=POGO r=peter then c=POGO r=peter
else c="${p#0}"; r="$c" else c="${p#0}"; r="$c"
fi fi
sed '1,3d;$d' <$j | src/client/empire "$c" "$r" >&3 src/client/empire "$c" "$r" <$j >&3
echo "Player $p Turn $t completed successfully" >&3 echo "Player $p Turn $t completed successfully" >&3
done done
need_update=y need_update=y

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed POGO peter << EOF
xdump meta sect xdump meta sect
xdump meta ship xdump meta ship
xdump meta plane xdump meta plane
@ -50,4 +47,3 @@ xdump meta retreat-flags
xdump meta ship-chr-flags xdump meta ship-chr-flags
xdump meta treaty-flags xdump meta treaty-flags
xdump meta country xdump meta country
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
xdump sect 0,0 xdump sect 0,0
break break
expl c 0,0 1 uh expl c 0,0 1 uh
@ -52,4 +49,3 @@ des 0,-2 c
capital 0,-2 capital 0,-2
des 0,0 g des 0,0 g
thres d 0,0 1 thres d 0,0 1
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 2 << EOF
break break
expl c 0,0 1 uh expl c 0,0 1 uh
desi 1,-1 + desi 1,-1 +
@ -56,4 +53,3 @@ xdump meta retreat-flags
xdump meta ship-chr-flags xdump meta ship-chr-flags
xdump meta treaty-flags xdump meta treaty-flags
xdump meta country xdump meta country
EOF

View file

@ -1,10 +1,6 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 3 << EOF
break break
expl c 0,0 1 uh expl c 0,0 1 uh
desi 1,-1 + desi 1,-1 +
mov c 0,0 205 uh mov c 0,0 205 uh
desi 1,-1 g desi 1,-1 g
cen * cen *
EOF

View file

@ -1,10 +1,6 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 4 << EOF
break break
expl c 0,0 1 uh expl c 0,0 1 uh
desi 1,-1 + desi 1,-1 +
mov c 0,0 205 uh mov c 0,0 205 uh
desi 1,-1 g desi 1,-1 g
cen * cen *
EOF

View file

@ -1,10 +1,6 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 5 << EOF
break break
expl c 0,0 1 uh expl c 0,0 1 uh
desi 1,-1 + desi 1,-1 +
mov c 0,0 205 uh mov c 0,0 205 uh
desi 1,-1 g desi 1,-1 g
cen * cen *
EOF

View file

@ -1,10 +1,6 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 6 << EOF
break break
expl c 0,0 1 uh expl c 0,0 1 uh
desi 1,-1 + desi 1,-1 +
mov c 0,0 205 uh mov c 0,0 205 uh
desi 1,-1 g desi 1,-1 g
cen * cen *
EOF

View file

@ -1,10 +1,6 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 7 << EOF
break break
expl c 0,0 1 uh expl c 0,0 1 uh
desi 1,-1 + desi 1,-1 +
mov c 0,0 205 uh mov c 0,0 205 uh
desi 1,-1 g desi 1,-1 g
cen * cen *
EOF

View file

@ -1,10 +1,6 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
break break
expl c 0,0 1 uh expl c 0,0 1 uh
desi 1,-1 + desi 1,-1 +
mov c 0,0 205 uh mov c 0,0 205 uh
desi 1,-1 g desi 1,-1 g
cen * cen *
EOF

View file

@ -1,10 +1,6 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 9 << EOF
break break
expl c 0,0 1 uh expl c 0,0 1 uh
desi 1,-1 + desi 1,-1 +
mov c 0,0 205 uh mov c 0,0 205 uh
desi 1,-1 g desi 1,-1 g
cen * cen *
EOF

View file

@ -1,10 +1,6 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 10 << EOF
break break
expl c 0,0 1 uh expl c 0,0 1 uh
desi 1,-1 + desi 1,-1 +
mov c 0,0 205 uh mov c 0,0 205 uh
desi 1,-1 g desi 1,-1 g
cen * cen *
EOF

View file

@ -1,8 +1,4 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
real 0 -8:12,-4:4 real 0 -8:12,-4:4
cen * cen *
map # map #
read y read y
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
desi -1,-1 b desi -1,-1 b
mov i 2,0 200 4,0 mov i 2,0 200 4,0
mov i 1,-1 4 jh mov i 1,-1 4 jh
@ -16,4 +13,3 @@ dist # 5,-1
thre h 4,0 1 thre h 4,0 1
thre l 3,-1 1 thre l 3,-1 1
desi 5,-1 h desi 5,-1 h
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
cen * cen *
map # map #
read y read y
@ -28,4 +25,3 @@ thres d 4,-2 10
thres d -1,-1 50 thres d -1,-1 50
thres c 1,1 768 thres c 1,1 768
prod * prod *
EOF

View file

@ -1,10 +1,6 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
cen * cen *
map # map #
read y read y
exp c 0,0 50 gyyygh exp c 0,0 50 gyyygh
des -7,-3 ) des -7,-3 )
lost * lost *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
cen * cen *
ship * ship *
map # map #
@ -16,4 +13,3 @@ h
assault 11,-1 0 assault 11,-1 0
25 25
prod * prod *
EOF

View file

@ -1,8 +1,4 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
cen * cen *
map # map #
read y read y
lost * lost *
EOF

View file

@ -1,10 +1,6 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
real 0 -8:16,-4:4 real 0 -8:16,-4:4
cen * cen *
ship * ship *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
real 1 -16:24,-8:8 real 1 -16:24,-8:8
convert 11,-1 76 convert 11,-1 76
thres c -2,2 769 thres c -2,2 769
@ -34,4 +31,3 @@ ship *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
exp c 0,0 1 gh exp c 0,0 1 gh
exp c 0,0 1 yh exp c 0,0 1 yh
exp c 0,0 1 ygh exp c 0,0 1 ygh
@ -31,4 +28,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
build bridge 5,-1 j build bridge 5,-1 j
explore c 5,-1 1 jh explore c 5,-1 1 jh
mov c 5,-1 76 7,-1 mov c 5,-1 76 7,-1
@ -30,4 +27,3 @@ ship *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
des 7,-1 c des 7,-1 c
capital 7,-1 capital 7,-1
des * ?gold>1 g des * ?gold>1 g
@ -28,4 +25,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
des 0,2 m des 0,2 m
deliver i 0,2 0 j deliver i 0,2 0 j
thres d 0,2 0 thres d 0,2 0
@ -29,4 +26,3 @@ ship *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
thres c -3:-1,-1 769 thres c -3:-1,-1 769
des 0:2,0 m des 0:2,0 m
thres i 0:2,0 1 thres i 0:2,0 1
@ -9,4 +6,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
mov u 2,0 10 7,-1 mov u 2,0 10 7,-1
des -2,2 i des -2,2 i
thres l -2,2 600 thres l -2,2 600
@ -16,4 +13,3 @@ ship *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
thres d 1,-1 0 thres d 1,-1 0
mov d 1,-1 1 4,0 mov d 1,-1 1 4,0
des 3,-1 m des 3,-1 m
@ -21,4 +18,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
mov h 5,-1 100 7,-1 mov h 5,-1 100 7,-1
build bridge 7,-1 j build bridge 7,-1 j
explore c 7,-1 1 jh explore c 7,-1 1 jh
@ -51,4 +48,3 @@ ship *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
des -3,-1 j des -3,-1 j
thres i -3,-1 999 thres i -3,-1 999
thres l -3,-1 1 thres l -3,-1 1
@ -15,4 +12,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
thres l 6,-2 300 thres l 6,-2 300
thres l 5,-1 200 thres l 5,-1 200
thres h 5,-1 200 thres h 5,-1 200
@ -15,4 +12,3 @@ ship *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
des -1,-1 m des -1,-1 m
thres i -1,-1 1 thres i -1,-1 1
thres d -1,-1 0 thres d -1,-1 0
@ -24,4 +21,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
build l 10,2 cav 5 build l 10,2 cav 5
build sh 5,-1 cs 3 build sh 5,-1 cs 3
thres m 10,2 25 thres m 10,2 25
@ -13,4 +10,3 @@ land *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
des 6,-2 t des 6,-2 t
des 6,0 h des 6,0 h
thres d 6,0 0 thres d 6,0 0
@ -18,4 +15,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
des -2,-2 j des -2,-2 j
thres l -2,-2 1 thres l -2,-2 1
des -4,-2 k des -4,-2 k
@ -59,4 +56,3 @@ land *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 2 << EOF
explore c 2,0 1 uh explore c 2,0 1 uh
explore c 2,0 1 jh explore c 2,0 1 jh
explore c 2,0 1 bh explore c 2,0 1 bh
@ -90,4 +87,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
thres c -2,0 769 thres c -2,0 769
thres c 1,1 769 thres c 1,1 769
thres c 5,-1 769 thres c 5,-1 769
@ -20,4 +17,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
lload m 4/5 5 lload m 4/5 5
lload s 5 200 lload s 5 200
lload g 5 20 lload g 5 20
@ -27,4 +24,3 @@ plane *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 2 << EOF
des 0:2,0 m des 0:2,0 m
thres i 0:2,0 1 thres i 0:2,0 1
thres i -5,-1 999 thres i -5,-1 999
@ -22,4 +19,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
thres c * 769 thres c * 769
thres i -2:0,-2 1 thres i -2:0,-2 1
des -2:0,-2 m des -2:0,-2 m
@ -17,4 +14,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
build p 11,-1 f1 3 build p 11,-1 f1 3
thres s 11,-1 200 thres s 11,-1 200
thres p 11,-1 200 thres p 11,-1 200
@ -23,4 +20,3 @@ plane *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 2 << EOF
des -5,-1 j des -5,-1 j
thres l -5,-1 1 thres l -5,-1 1
thres l 3,-1 300 thres l 3,-1 300
@ -12,4 +9,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
des 5,-1 d des 5,-1 d
thres g 5,-1 1 thres g 5,-1 1
des -6,-4 f des -6,-4 f
@ -30,4 +27,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 << EOF
mov c 1,-1 230 jjh mov c 1,-1 230 jjh
mov c 3,-1 230 jh mov c 3,-1 230 jh
mov c 2,-2 230 njh mov c 2,-2 230 njh
@ -34,4 +31,3 @@ plane *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 2 << EOF
des 3,-1 l des 3,-1 l
thres d 3,-1 0 thres d 3,-1 0
des 5,-1 k des 5,-1 k
@ -17,4 +14,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 8 << EOF
des -4,-4 o des -4,-4 o
thres o -4,-4 1 thres o -4,-4 1
thres o -5,-3 0 thres o -5,-3 0
@ -9,4 +6,3 @@ cen *
map # map #
read y read y
prod * prod *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed POGO peter << EOF
xdump sect 0,0 xdump sect 0,0
xdump ship * xdump ship *
xdump plane * xdump plane *
@ -50,4 +47,3 @@ xdump retreat-flags *
xdump ship-chr-flags * xdump ship-chr-flags *
xdump treaty-flags * xdump treaty-flags *
xdump country * xdump country *
EOF

View file

@ -1,6 +1,3 @@
#!/bin/sh
. "${SCRIPTDIR}"/common.sh
runfeed 1 1 << EOF
xdump sect 0,0 xdump sect 0,0
xdump ship * xdump ship *
xdump plane * xdump plane *
@ -50,4 +47,3 @@ xdump retreat-flags *
xdump ship-chr-flags * xdump ship-chr-flags *
xdump treaty-flags * xdump treaty-flags *
xdump country * xdump country *
EOF