1 |
|
2 |
|
3 |
|
4 | AGENT=./codegradxvmauthor.js
|
5 | HOSTNAME=vmauthor.codegradx.org
|
6 | HOSTIP=192.168.122.205
|
7 |
|
8 | [ -d tmp ] && rm -rf tmp
|
9 | mkdir -p tmp
|
10 |
|
11 |
|
12 | CREDENTIALS=tmp/fw4ex-author0.json
|
13 | wget -O $CREDENTIALS http://$HOSTIP/fw4exjson/0
|
14 |
|
15 |
|
16 |
|
17 | $AGENT --ip=$HOSTIP --credentials=$CREDENTIALS --update-credentials || true
|
18 |
|
19 |
|
20 | EXOTGZ=spec/org.example.fw4ex.grading.check.tgz
|
21 | $AGENT --ip=$HOSTIP \
|
22 | --credentials=$CREDENTIALS \
|
23 | --type=exercise \
|
24 | --xmldir=tmp \
|
25 | --stuff=$EXOTGZ --follow
|
26 |
|
27 |
|
28 | [ -f tmp/2-exerciseAuthorReport.xml ] && \
|
29 | grep ' safecookie=' < tmp/2-exerciseAuthorReport.xml
|
30 |
|
31 |
|
32 | [ -f tmp/5-jobStudentReport.xml ] && \
|
33 | [ -f tmp/8-jobStudentReport.html ]
|
34 |
|
35 |
|
36 |
|
37 | $AGENT --ip=$HOSTIP \
|
38 | --credentials=$CREDENTIALS \
|
39 | --type=job \
|
40 | --xmldir=tmp \
|
41 | --counter=100 \
|
42 | --stuff=spec/oefgc/1.tgz --follow \
|
43 | --exercise="file:tmp/2-exerciseAuthorReport.xml"
|
44 |
|
45 |
|
46 | [ -f tmp/102-jobStudentReport.xml ] && \
|
47 | grep -q ' mark="10" totalMark="100"' < tmp/102-jobStudentReport.xml && \
|
48 | echo OK
|
49 |
|
50 |
|