epfl-archive/cs457-gc/docker_test.sh

22 lines
398 B
Bash
Raw Permalink Normal View History

2022-04-07 18:46:57 +02:00
#!/bin/bash
last="3"
maj=0
id=0
if [ -n "$1" ]; then
maj=$1
if [ -n "$2" ]; then
id=$2
else
echo "Usage is ./test.sh [1,2,3,...] [1,2,3,...]"
exit 1
fi
else
echo "Usage is ./test.sh [1,2,3,...] [1,2,3,...]"
exit 1
fi
docker exec -it conda /bin/bash -c "cd /opt/notebooks/assignment_$maj\_$id/test;conda run -n gc_course_env pytest test.py"
exit 0