RST"> How to Run RST

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 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

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 testrunname

Meaning 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/

Run rst on students whose userid start with a

rst -t t -s 'a*' aXX suitename testrunname

Run rst on whole class

rst -t t -s '*' aXX suitename testrunname

Short rst command without a test run name

rst -s userid aXX suitename

If testrunname is not specified, RST will pick one for you that represents a timestamp (MMDDhhmmss).

RST (distrst)"> Distributed RST (distrst)

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.

RST Command Line Options

There are several options available from the command-line to the RST family of commands.


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:

  • p Postscript
  • f PDF
  • t Text

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.


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.


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.


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.


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.

RST configuration: /u/csNNN/.rstrc

The file .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.

RST Information That Maybe O"> Old RST Information That Maybe Outdated

Edit | Attach | Watch | Print version | History: r21 < r20 < r19 < r18 < r17 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r21 - 2019-08-29 - YiLee
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback