Set the directory of the GAMBIT executable named gambit:
export GAMBIT= ... path to gambit ...
Run all the BATS tests with output in TAP format:
bats --tap *.bats
There are three files:
funcs.bats: tests my testing setup!gambit_io.bats: io tests of gambit. E.g. does it return correct error codes?gambit_yaml.bats: Functional tests of gambit from yaml files.
Other than GAMBIT, we require numdiff, BATS and PyYAML.
The YAML files must contain a special Test block with testing information, e.g.,
Test:
gambit: ./data_gambit/DarkBit_lnL_oh2/samples/DarkBit_lnL_oh2.dat # Result produced by YAML file
expected: ./data_expected/DarkBit_lnL_oh2.expected # Expected result
rtol: 1E-3 # Acceptable relative error in result
email: name@domain.com # Contact email addresses separated by whitespace
There are four mandatory recognized entries: gambit, expected, rtol and email. Note that gambit on Jenkins produces data files without an _0 suffix so don't include it. This may differ from behaviour on your computer.
Add a test to gambit_yaml.bats by coping this template:
@test "ScannerBit_multinest with gambit" {
local test=ScannerBit_multinest
local yaml=./yaml/$test.yaml
source_yaml "$yaml"
run gambit_id_ascii_files "$yaml" "$Test_gambit" "$Test_expected" "$Test_rtol"
[ $status = 0 ]
and changing ScannerBit_multinest with gambit and ScannerBit_multinest to the description and
name of your yaml file (excluding the .yaml extension).
You must add the expected output (Test:expected in the YAML file) to the ./data_expected directory.