forked from UTokyo-IPP/utpython_lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-all.sh
executable file
·35 lines (33 loc) · 2.93 KB
/
test-all.sh
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
#!/bin/bash
# An ad-hoc script to run integration tests for some notebooks.
# It assumes that:
# 1. The autograder docker image has been built
# 2. The local Docker instance of autograder is running (via docker/start-local-server.sh)
# without authentication and serves notebook upload requests at http://localhost:8000/upload
# 3. Student version of the notebooks has been built and unpacked to tmp/student
# (via ./build-student.sh)
cd "$(dirname "$0")"
if [[ ! -d tmp/student ]]; then
echo "tmp/student does not exist, did you run build-student.sh?" >&2
exit 1
fi
if [[ $(python --version 2>&1) =~ Python\ 2.* ]]; then
echo "Default Python version is 2.x, please change environment to Python 3.x" >&2
exit 1
fi
set -e
python python/test_integration.py --student_notebook tmp/student/1/1-1-student.ipynb --master_notebook 1/1-1.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/1/1-2-student.ipynb --master_notebook 1/1-2.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/1/1-3-student.ipynb --master_notebook 1/1-3.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/2/2-1-student.ipynb --master_notebook 2/2-1.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/2/2-2-student.ipynb --master_notebook 2/2-2.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/2/2-3-student.ipynb --master_notebook 2/2-3.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/3/3-1-student.ipynb --master_notebook 3/3-1.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/3/3-2-student.ipynb --master_notebook 3/3-2.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/4/4-1-student.ipynb --master_notebook 4/4-1.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/4/4-2-student.ipynb --master_notebook 4/4-2.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/5/5-1-student.ipynb --master_notebook 5/5-1.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/5/5-3-student.ipynb --master_notebook 5/5-3.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/6/6-1-student.ipynb --master_notebook 6/6-1.ipynb --upload_url http://localhost:8000/upload.txt
python python/test_integration.py --student_notebook tmp/student/6/6-2-student.ipynb --master_notebook 6/6-2.ipynb --upload_url http://localhost:8000/upload.txt
echo OK