Copy the test-runner.sh
file somewhere and set it as executable (chmod +x test-runner.sh
)
Run ./test-runner.sh <folder>
.
The folder to be executed must have the following structure (trabalho-1
):
|-trabalho-1
| |-testes
| | |-README.txt
| | |-7.out
| | |-7.in
| | |-6.out
| | |-6.in
| | |-5.out
| | |-5.in
| | |-4.out
| | |-4.in
| | |-3.out
| | |-3.in
| | |-2.out
| | |-2.in
| | |-1.out
| | |-1.in
| |-main.c
|-test-runner.sh
The main file must be named main.c
, and the test cases must be in a subfolder called testes
in the form N.in
for inputs, N.out
for expected outputs.
GCC flags can be used by setting the CFLAGS
environment variable:
CFLAGS="-O3" ./test-runner.sh FOLDER
CFLAGS defaults to -Wall -Wextra -pedantic -Werror