A tool to run multiple programs on a set of tests. It can help when creating programming assignments.
You can run multiple programs on a set of tests.
You can also check if two programs agree on random tests.
You should have Go and the timeout command installed.
To install the pantest
binary simply run this command:
go install github.com/pandrei7/pantest@latest
If you want to work on the code, the repository is hosted on Github:
# Clone the repo.
git clone https://github.com/pandrei7/pantest
# Download the Go dependencies.
cd pantest
go mod tidy
First create a configuration file using pantest init
and
customize it to your needs.
If you have a set of tests you want to evaluate, run pantest run
.
If you want to check whether two programs are "equivalent", run pantest same
.
Use the --help
flag after any command whenever you need more details.
The input and reference files should have .in
and .ref
extensions,
respectively. Ideally, they should also contain a number in the name.
For similarity checking, you should provide a command to generate a random test case (written to standard out) and a directory where these tests will be saved. Tests which do not generate a mismatch will be removed automatically.
Make sure all sources use standard IO to read and write, not file IO.
For each executable, you can configure:
cmd
: a command to run the executablename
(optional): a name to be displayedtime
(optional, defaults to1
): the time limit for one run, in seconds