Resources and Information for CS 246 ISA

Please refer to the handbook for up-to-date information regarding CS 246. Please ask your ISC if you can't access that page.

Information below are no longer relevant

CS246 is currently in the process of moving off the ISG Twiki and onto a dedicated handbook. Much of the information on this page is likely outdated and will not always be marked as such. Please contact Sean Harrap for access to the current work-in-progress handbook to have access to accurate documentation for everything that's changed. Some directories in the CS246 course account should also contain a README.md file containing a relevant page from the handbook.

Key Links

Outdated

Crontab Server

We use crontab to setup assignment deadlines. Typical crontab rules for each assignment looks like this: #A1 comment line 00 15 18 01 * /software/ssh/bin/ssh -x cpu-solaris.student.cs "/u/isg/bin/deadline 1 l" #this is for the late 00 15 20 01 * /software/ssh/bin/ssh -x cpu-solaris.student.cs "/u/isg/bin/deadline 1 n" #this is for closing the assignment submission minute assignment name hour 'l' for late, 'n' for close submission day month

The server which we use to place all our deadline crontabs is on cpu02.student.cs. View what is currently in the crontab by typing crontab -l (or rsh cpu02.student.cs crontab -l if you're on a different server).

To change what is in the crontab, rsh cpu02.student.cs, set your VISUAL environment variable to vim (or your favourite editor like nano), then type crontab -e.

NOTE: 00,05,10,15,20,25,30,35,40,45,50,55 * * * * /software/ssh/bin/ssh -x cpu-solaris.student.cs "/u/cs246/bin/testcompileLocker" is the crontab rule for testcompile and should be left there (untouched).

Assignment preparation

For each assignment you are responsible for opening the submission and creating public tests ( testcompile) so the students can confirm their code will compile on the test machine.

CS246 uses the submit command for assignment submission. For more information on submit, please see PreparingSubmitForEachAssignment

testcompile

testcompile is a specific test suite that is provided to students as a 'smoke test' to see if their code will at least compile on the testing machines. Please see previous example of testcompile scripts ( ~cs246/marking/#/testm.testcompile/) for examples of previous test compiles suites. The scripts should be ALMOST identical for each assignment.

RST Testing

First, be sure to review the information on the RST page: ISGScriptsManPages#RST

Tests for rst are to store the tests at ~cs246/marking/A#/test[pm].suite/, for examples of these look in the archives folder under the ~cs246/marking/#/testp.a#/ for rst test suite examples.

testgen

testgen is an assignment preparation tool I developed at the end of the term. It helps create the rst test suites by filling out a bunch of forms on the web page: http://www.student.cs.uwaterloo.ca/~cs246/current/page.html

Currently, it is not completed, or tested very extensively.

This is how it works:

  • An html interface (page.html) with a whole bunch of forms creates a rstd.xml file. This file is an assignment description file used to generate the rst test scripts.
  • testgen program (located in the ~cs246/bin/ folder takes the rstd.xml file as input and creates the rst test suite based on that file).

testgen Program

testgen is a script in the ~cs246/bin/ folder that is just used to launch the actual tg program (located in ~cs246/bin/bin_testgen). the tg program is a C++ application that does the actual parsing of the rstd.xml file. If you were to use this tool and you find errors (which you probably will) then the C++ program in that folder is what you will have to change. The parse.cpp is the code for the parser. This is the file you will probably have to change if you find errors.

How the program works:

  • testgen.cpp, is the file with the main() function. This will call the tokenize() to turn the xml file into a vector of tokens. After tokenizing, main() will call the parse() function which will parse the tokens and generate the output (test suite).
  • tokenize.cpp, is the file with the tokenize() function. This function is well tested and shouldn't have any errors in it.
  • parse.cpp, is the file with the parse() function.

Using testgen

Once you go through the testgen web form, since it is still not perfected and tested, it doesn't actually put the generated files in the directories that they are supposed to be in. If you want to use this tool, then you have to move everything yourself. Go to ~cs246/public_html/cgi-bin/tmp/ and look for the temporary folder you created (should be 6 numbers representing the time HHMMSS). Once in the folder you will see path.* files. move the path.* files to the directory specified. For example files: path.u.cs246.course.a1.mark-scheme.relcalc.style, path.u.cs246.handin.a1..subfiles, path.u.cs246.marking.a1.testp.testgensuite should be moved to: /u/cs246/course/a1/mark-scheme/relcalc.style, /u/cs246/handin/a1/.subfiles, /u/cs246/marking/a1/testp.testgensuite

The actual RST suite is in the path.u.cs246.marking.a1.testp.testgensuite. PLEASE look over the scripts and test them out and DO NOT trust them to work right off the bat, since testgen was not tested properly.

Also, any provided files should be put in the testp.testgensuite/provided folder.

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatext includeMakefile r1 manage 0.9 K 2009-08-21 - 16:07 PeterBeshai Makefile for automating test includes
Compressed Zip archivezip sample-suite-alternative.zip r1 manage 4.8 K 2009-08-21 - 16:07 PeterBeshai Sample Test Suite #3 - Alternative Outputs
Compressed Zip archivezip sample-suite-diff.zip r1 manage 3.1 K 2009-08-21 - 16:07 PeterBeshai Sample Test Suite #2 - Diff Output Analyzer
Compressed Zip archivezip sample-suite-simple.zip r1 manage 3.1 K 2009-08-21 - 16:06 PeterBeshai Sample Test Suite #1 - Simple Output Analyzer
Edit | Attach | Watch | Print version | History: r20 < r19 < r18 < r17 < r16 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r20 - 2018-09-05 - 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