Skip to content

Commit 0195271

Browse files
committed
Load the examples from problemtools in travis.
This will give us more test coverage, especially for the new interactive problem format, see DOMjudge#465. Also, we're testing zipped problem import with it.
1 parent a45bc7f commit 0195271

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

travis.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ fi
152152
cd ${DIR}/tests
153153
make check-syntax check test-stress
154154

155+
# Prepare to load example problems from Kattis/problemtools
156+
echo "machine localhost login admin password admin" > ~/.netrc
157+
cd /tmp
158+
git clone https://github.com/Kattis/problemtools.git
159+
cd problemtools/examples
160+
for i in hello different guess; do
161+
(
162+
zip -r "../${i}.zip" -- *
163+
)
164+
curl -X POST -n -N -F zip[]=@${i}.zip http://localhost/domjudge/api/contests/2/problems
165+
done
166+
155167
# wait for and check results
156168
NUMSUBS=$(curl http://admin:admin@localhost/domjudge/api/contests/2/submissions | python -mjson.tool | grep -c '"id":')
157169
export COOKIEJAR

0 commit comments

Comments
 (0)