A testing utility for CMPUT 415 at the University of Alberta
Go to file
Ayrton Chilibeck 2d7e711930
ci/woodpecker/push/workflow Pipeline failed Details
Made changes to the config data struct
2024-01-15 00:40:48 -07:00
.woodpecker Added CI 2024-01-12 01:29:02 -07:00
src Made changes to the config data struct 2024-01-15 00:40:48 -07:00
.gitignore Added initial CLI arguments 2024-01-12 01:40:41 -07:00
Cargo.lock Chaged tests, Added stubs 2024-01-14 12:31:51 -07:00
Cargo.toml Chaged tests, Added stubs 2024-01-14 12:31:51 -07:00
README.md Fixed README to include threading 2024-01-12 23:01:28 -07:00

README.md

Tester CMPUT 415 (rust version)

This is a (mostly) drop-in replacement for the previous tester written for CMPUT 415.

Most of the options are specified in the config file, so the cli is minimal. We do specify some options:

Usage: tester [OPTIONS] --config-file <CONFIG> <COMMAND>

Commands:
  validate  Validate test matching and config file correctness
  run       Run all tests
  grade     Grade with grading config
  help      Print this message or the help of the given subcommand(s)

Options:
  -v, --verbosity...                   Sets the verbosity of the tester
  -t, --threads <THREADS>              Set the number of threads (only valid in run and grade mode)
  -c, --config-file <CONFIG>           Set the config file
  -g, --grading-conf <GRADING_CONFIG>  Set the grading config file
  -h, --help                           Print help
  -V, --version                        Print version

the verbosity defines the level of logging, you can play around with it (specify -v[v]+ for more verbose logging).

Configuration File

The configuration file is specified in YAML, so go check it out. Below is a fully featured config file, with more to come:

input_path: "/path/to/dir"
output_path: "/path/to/out/dir"
in_stream_path: "/path/to/in/stream"

tested_executables:
  - name: "team1"
    executable: "/path/to/exec"
  - name: "team2"
    executable: "/path/to/exec2"

runtimes:
  - name: "team1"
    executable: "/path/to/exec"
  - name: "team1"
    executable: "/path/to/exec"

toolchains:
  - name: "toolchain1"
    steps:
      - name: "step1"
        executable_path: "$EXE"
        arguments:
          - $INPUT
          - $OUTPUT
        output: "out.test"
      - name: "step2"
        executable_path: "/bin/bash"
        arguments:
          - echo "Hello World"
        output: "-"
  - name: "toolchain2"
    steps:
      - name: "step1"
        executable_path: "/bin/bash"
        arguments:
          - echo "Hello toolchain 2!"
        output: "-"

You can refer to the original tester documentation to see some more options (#TODO will be pasting that here)