8000 GitHub - pauldcs/tester.sh: Generic diff/valgrind based tester
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pauldcs/tester.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

    tester.sh
    By: pducos <pducos@student.42.fr>

SYNOPSIS
    ./tester.sh [-p program] [-s suffix] [-i input_directory] [-o output_directory] [-v] [-h]
        [-c] [-a] [-r output_file] [-m mode]

DESCRIPTION
    This script is used to test a program by running it on a set of input files
    and comparing its output to the expected output. The script takes several command line
    options such as the name of the program to test, the suffix of the input files, 
    and the directories containing the input and expected output files.
    
    The `-m` argument specifies the mode in which the tests should be run. 
      If the mode is "args" (default), the content of the infile is passed
      as arguments to the program. 
      If the mode is "path", the path to the infile is passed as arguments to the program.

    By default, the script runs the program on files with the ".in" suffix in the
    "infiles" directory and writes the program's output to a new "outfiles" directory. It then
    compares the actual output with the expected output in the "infiles" directory, both of
    which must have the ".out" suffix. The script can also be run under Valgrind to check for
    memory errors.

Example

bash-5.2$ cd test_suite
bash-5.2$ tree
.
├── infiles
│   ├── 00_test.in
│   ├── 00_test.out
│   ├── 01_test.in
│   └── 01_test.out
├── program_to_test -> ../program_to_test
└── tester.sh -> ../../tester.sh

bash-5.2$ ./tester.sh -p program_to_test

About

Generic diff/valgrind based tester

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0