71 lines
2.2 KiB
Markdown
71 lines
2.2 KiB
Markdown
# 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](#configuration-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](https://yaml.org/spec/1.2.2/), so go check it out. Below is a fully featured config file, with more to come:
|
|
|
|
``` yaml
|
|
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](https://github.com/cmput415/Tester) documentation to see some more options (#TODO will be pasting that here)
|