Operating Systems

ECE344, Spring 2019
University of Toronto

Labs and website created by: Ashvin Goel
Deadlock

Quick Links

Lab AssignmentsQuercus Website

The ECE344 AutoTester

We have provided you a program called ece344-tester that allows you to 1) test your code with various test cases, and 2) allows simulating the way we will be marking your code automatically. Please use this program before submitting your code so that you can catch obvious compilation errors, output errors, source code management errors, etc.

Tester Setup

You will need to setup your path to make it simpler for you to access the tester. To do so, you should check whether you use csh or bash as follows:

  % echo $0

If the output shows sh or bash, then you are using bash. If the output shows csh or tcsh, then you are using csh.

  1. For csh, add the following to the end of your ~/.cshrc:
    set path=( /cad2/ece344s/tester/bin $path)
  2. For bash, add the following to the end of your ~/.bashrc:
    export PATH=/cad2/ece344s/tester/bin:$PATH

Then make sure to log out and log back in. Run echo $PATH and you should see the new path.

Testing your code

Please use the following commands after you have compiled and run your code. For example, for Lab 1, you should write, compile and run the various simple programs described in the lab handout, and then run the tester.

  % cd ~/ece344/warmup
  % ece344-tester 1

You will need to be in the directory associated with the lab (e.g., warmup for Lab 1, threads for Lab 2 and 3), and specify the lab number for which the tests should be run. For example, for Lab 1, the lab_nr is 1. For each test, you will see one or more PASS or FAIL results.

You can see the output that is expected by the tester by specifying the -v (verbose output) option to the tester. Note that the tester looks for regular expressions, not exact matches. Please use ece344-tester -h for more details. Please see the tester FAQ also.

The output of the tester will be stored in two files in the directory in which the tester is run:

tester.log: Shows the output of your program when running the ece344 tester.
tester.out: Summarizes the marks for the various tests.

Simulating Marking

The tester helps you test your code. However, you need to simulate the marking functionality of the tester to find out whether you have submitted your code correctly.

Before you do this step, make sure to submit your code, or else the marking functionality will not work correctly.

Then, you can simulate the marking functionality by adding the -m option to the ece344-tester command:

  % cd ~/ece344
  # make a brand new directory
  % mkdir marker
  % cd marker
  % ece344-tester -m assignment_nr

The -m option will simulate the marking functionality. It will checkout your code from your remote repository (which you have created as part of submitting your code) using the assignment's end tag (e.g., Lab1-end), build the code, and then run the testing functionality on this code. Note assignment_nr is the lab number (1, 2, etc.).

The output will be stored in three files, shown below, in the ~/marker directory where you ran the tester. The XXX shown below is your user number. The last two files are copies of the original outputs of the tester.

marker-XXX.log: Shows the output of retrieving files from your remote repository, building your code, and running the marker functionality.
tester-XXX.log: Shows the output of your program when running the ece344 tester.
tester-XXX.out: Summarizes the marks for the various tests.

We will run the same marker program to mark your lab. You will receive these files by email when we finish marking your lab. Let us know if you don't receive these files within one week after the lab submission deadline.

We do not use any "hidden" test cases, so there are no surprises. Make sure to run the marker before submitting your code - it will tell you the marks you will get for your submission!