Skip to content

wepsim/tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WepSIM Tester for submissions

Contents

1. Initial steps

  1. First, you need to download the project (download the .zip file or "git clone" it):

    wget https://github.com/wepsim/tester/archive/refs/heads/main.zip
    unzip tester-main.zip
    mv tester-main lab_checker
    cd lab_checker
  2. Then, you need to download all laboratories of each teaching group and save the associated .zip file in the submissions directory.

    ls -las submissions
  3. Finally, complete the solutions in the test directory files (labeled as TODO within the files).

    ls -las test

2. To check one group for the first time

  1. The typical steps for the example group 90 are (submissions packed in the p2-90.zip file):

    ./ws.sh start                                : 1. To spin up one container
     cd /work/results                            : 2. Go to the results directory
    ./s10_unzip.sh    p2-90.zip                  : 3. To unzip the submitted files at p2-90.zip
    ./s10_tests.sh    tests/tests.in             : 4. To get the execution output to compare with
    ./s40_checker.sh  tests/tests.in  p2-90.in   : 5. To check only the 90 group.
     lynx report-p2-90.html                      : 6. To open the associated report within the container
     exit                                        : 7. To exit the container
    ./ws.sh stop                                 : 8. To spin down the container.

    The following image is an example of report generated:

    Example of report for group 90

    Main parts:

    • (1) Summary of all tests.
    • (2) Microcode only.
    • (3) Assembly only.
    • (4) Link to the directory with all submitted files.
    • (5) Links to the assembly code with the corresponding tests executed.
    • (6) Result of a particular test for one particular group.
More detailed...
  1. First, you need to spin up the container with:

    ./ws.sh start
  2. To unzip the submitted files in p2-90.zip for the group 90 please use:

    ./s10_unzip.sh  p2-90.zip
  3. To prepare the execution output to compare with:

    ./s10_tests.sh      tests/tests.in
  4. To check only the 90 group:

    ./s40_checker.sh    tests/tests.in   p2-90.in
  5. To show the results, first you could start a simple web server with:

    python3 -m http.server 8000 &

    And use outside the container (in your host system) your web browser:

    firefox http://localhost:8000/report-p2-90.html
  6. Finally, you can spin down the container:

    exit
    ./ws.sh stop

3. To check again one group and make the ajustments to the submissions

  1. First, you need to spin up the container with:

    ./ws.sh start
  2. For each submitted work named <xxxxx_yyyyy> that needs some modification please first backup the original files in the ORIGINAL subdirectory:

    pushd .
    cd p2-90/<xxxxx_yyyyy>/
    mkdir -p      ORIGINAL
    cp    -a  *   ORIGINAL/
  3. Please make the amendments, for example:

    • If file names are not OK (p2-report.pdf, ej2_microcode.txt.txt, etc.)
      mv ej2_microcode.txt.txt e2_checkpoint.txt
    • If e1_checkpoint.txt is not a checkpoint, but the microcode as text:
      : Following commands build a checkpoint from the microcode and an empty assembly code
      touch /tmp/empty.asm
      mv    e1_checkpoint.txt   e1_mcode.txt
      ./wepsim.sh -a build-checkpoint -m ep -f e1_mcode.txt -s /tmp/empty.asm > e1_checkpoint.txt
    • Etc.
  4. Usually the adjustments involve penalties for not following what is requested in the statement. Please take note of the adjustments in your spreadsheet (or notes associated).

    : For example, notes.txt is a log with the adjustments:
    echo "ej2_microcode.txt.txt -> e2_checkpoint.txt"  >> p2-90/<xxxxx_yyyyy>/notes.txt
  5. Check again:

    popd
    ./s40_checker.sh  tests/tests.in  p2-90.in
    lynx report-p2-90.html
  6. Finally, you can spin down the container:

    exit
    ./ws.sh stop

About

WepSIM command line tester

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages