Skip to content

Commit 5b95519

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 #465. Also, we're testing zipped problem import with it.
1 parent a45bc7f commit 5b95519

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

travis.sh

+13
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,19 @@ fi
152152
cd ${DIR}/tests
153153
make check-syntax check test-stress
154154

155+
# Prepare to load example problems from Kattis/problemtools
156+
echo "INSERT INTO userrole (userid, roleid) VALUES (3, 1);" | mysql domjudge
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+
cd "$i"
163+
zip -r "../${i}.zip" -- *
164+
)
165+
curl -X POST -n -N -F zip[]=@${i}.zip http://localhost/domjudge/api/contests/2/problems
166+
done
167+
155168
# wait for and check results
156169
NUMSUBS=$(curl http://admin:admin@localhost/domjudge/api/contests/2/submissions | python -mjson.tool | grep -c '"id":')
157170
export COOKIEJAR

0 commit comments

Comments
 (0)