Differences between revisions 2 and 6 (spanning 4 versions)
Revision 2 as of 2013-01-25 20:21:56
Size: 3429
Comment:
Revision 6 as of 2013-09-23 10:11:33
Size: 3855
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#acl All:read
Line 6: Line 8:
   * [[https://cgi.cse.unsw.edu.au/~give/Autom/index.php|automarkEdit]] - a web interface to help you set up the autotesting specfication.    * [[https://cgi.cse.unsw.edu.au/~give/Autom/index.php| Web interface ]] to help you set up the autotesting specfication.
Line 89: Line 91:
&performance 10
Line 95: Line 99:
 * '''&performance''' ''total_testing_mark'' ''abort_min_tests''
   * total_testing_mark is the maximum mark for passing all the tests, each failed test deducts mark from this maximum
   * abort_min_tests: the autotesting aborts after the submission failed this number of tests
   This directive is described very well [[https://www.cse.unsw.edu.au/~give/Documents/Manual/give_html/node64.html|here]]

Autotesting Specs

Pre-test phase

  • &compile
    rm -f *.c
    rm -f a.out
    
    f=grid.c
    classify -v $1
    dos2unix $f
    list $f
    
    options="-O -Wall -Werror"
    echo "Compiling with $options ..."
    echo
    gcc $options $f
    compile_status=$?
    if [ $compile_status != 0 ]
    then
        echo
        echo "** No good. Exiting..."
        exit 1
    fi
    
    cp ~/bin/trim.pl .
    cp $A/gridTest[1-6] .
    
    &end
    
    &timelim 3
    &linelim 120 20
    &exec ./a.out
  • &compile - enter the script to compile submission and to print code listings, terminate with &end

  • &prep - enter the script to run before each test, terminate with &end

  • &linelim m n - print the first m output lines and the last n output lines

  • &timelim s - cpu time limit

  • &exec command - $exec anywhere in the test suite will be substituted by the command

Test phase

  • &test 1
    &mark 1.5  gridTest1 no valid row col input
    &invoke $exec < gridTest1 | ./trim.pl
    &match < Student output and > Sample output
    diff -iw $stdout $stdres
    &showdiff -120w -iWt
    
    &test 2
    &mark 1.5  gridTest2 middle cell
    &invoke $exec < gridTest2 | ./trim.pl
    &match < Student output and > Sample output
    diff -iw $stdout $stdres
    &showdiff -120w -iWt
  • &test n

  • &mark mark description

  • &invoke command

  • &match description - put the command to match the student output and the sample output on the following line

  • &show file

  • &showdata optional_command

  • &showdiff arguments

    • &showdiff -nw sdiff_arguments - translate into sdiff command and arguments

    • &showdiff -w diff_arguments - translate into diff command and arguments

  • &special mark description - enter the script to define testing that can't be defined using the standard testing directives, terminate with &end

Post-test phase

  • &performance 10
    
    &subjective 5
    Human Marker    5
    &end
    
    &totalmark 15
  • &performance total_testing_mark abort_min_tests

    • total_testing_mark is the maximum mark for passing all the tests, each failed test deducts mark from this maximum
    • abort_min_tests: the autotesting aborts after the submission failed this number of tests

      This directive is described very well here

  • &subjective total_subjective_mark

    • description TAB mark

    • description TAB mark

    • ...

    &end

  • Used by Xmark (classrun -mark). /!\ You must insert a TAB character between description and mark in order that Xmark parses the subjective assessment correctly.

  • &totalmark total_assignment_mark

give.spec/runspecs (last edited 2021-05-24 12:25:48 by MeichengWhale)