rst
is a command that you need to run from the terminal in the course account. It tests student code against some test cases that you have to create.
Step 1
SSH into the course account on linux.student.cs.uwaterloo.ca
. Ask your ISC or CSCF if you don't have access.
Step 2
Put the students' files inside the course account, under handin/aXX/userid/
where aXX
is the assignment number (ex. a01) and userid
is the student's userid. Inside the aXX
folder, there should be a folder for each student.
If students are submitting on MarkUs, MarkUs will automatically create the aXX
and userid
folders for you.
Step 3
Put your test suite inside the course account, under marking/aXX/test.suitename
where aXX
is the assignment number and should match what's in handin
. You can change suitename
to whatever you want, but for public tests, it must be pt
, so that the name of the folder is test.pt
.
For information on what goes in the test.suitename
folder, see the RST/Bittersuite examples on the home page
Step 4 Here are examples of running rst
. Type these commands in the terminal in the course account. If you get an error saying "Command rst not found", type in /u/isg/bin/rst
instead of just rst
. You can add an alias if you get tired of typing /u/isg/bin/rst
.
Run rst on one student
rst -t t -s userid aXX suitename testrunnameMeaning of arguments:
-t t
Save test results as text file.
-s userid
Run RST on the files in handin/aXX/userid/
suitename
Use the test suite marking/aXX/test.suitename
testrunname
Save the output in marking/aXX/test.suitename.testrunname/userid/
rst -t t -s 'a*' aXX suitename testrunnameRun rst on whole class
rst -t t -s '*' aXX suitename testrunnameShort rst command without a test run name
rst -s userid aXX suitenameIf
testrunname
is not specified, RST will pick one for you that represents a timestamp (MMDDhhmmss).
distrst
runs rst
simultaneously on several computers so that testing is faster. Just replace rst
in your command with distrst
.
On each server, distrst
will also test multiple submissions at the same time. Make sure that your test scripts can be run in parallel. For example, if your test scripts creates the file /u/csNNN/testing-file.txt
, and you run your test script multiple times simultaneously, the file /u/csNNN/testing-file.txt
may not be updated properly. In general, your test scripts should always do its work from a temporary directory with a random name.
-t
This should be followed by a series of letters which indicate the type of RST output that is being generated. This can be any combination of the following three:
In addition, the single letter c can be specified. This indicates that not only should all types of output be generated, but every other file generated by RST in the temporary directory should also be kept in the results directory for future examination. This option should be used with care, and only on small numbers of students at a time.
-s
This should be followed by a single parameter: a set of whitespace-delimited glob patterns that will be shell-expanded to determine what set of students the command being run should apply to.
-o
This should be followed by a single parameter, representing the location in the filesystem that will be used for output of this command. What the output represents varies by command; in the case of marmocreate it's a zip file of the tests which should be run by Marmoset, whereas in the case of distrst it's a directory which will contain logs for all of the rst runs performed.
-v
This is followed by a number indicating which version of RST's command line conventions should be assumed for all of the following command line arguments. Currently, this will need to be either 1 or 2.
-d
This option gives a command-line hook into all of the behaviour that can be specified in .rstrc
. It is followed by a parameter of the form variable
= value
which will then be interpreted inside of the command's context.
.rstrc
in the course account contains some RST configuration, such as which servers can be used for public tests and distrst
. This file should already be set up for you, but if you need to change any settings, you can go ahead and edit the file.