forked from GambitBSM/gambit_bats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gambit_yaml.bats
95 lines (79 loc) · 2.42 KB
/
gambit_yaml.bats
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env bats
#
# GAMBIT tests of yaml files BATS framework. See e.g. https://github.com/sstephenson/bats
#
# Written by A. Fowlie.
# GAMBIT helper functions.
load funcs
load gambit
load pyyaml
# Remove output files if present (shouldn't be)
setup() {
:
}
# Echo information on teardown, if error
# Remove output files if present (should be in most cases)
teardown() {
error "$output"
error email = "$Test_email"
rm -f Key.dat # TODO: This file should never be generated
}
# BAT framework tests - make information as descriptive as possible.
@test "DarkBit_lnL_oh2 with gambit" {
local test=DarkBit_lnL_oh2
local yaml=./yaml/$test.yaml
source_yaml "$yaml"
run gambit_id_ascii_files "$yaml" "$Test_gambit" "$Test_expected" "$Test_rtol"
[ $status = 0 ]
}
@test "ColliderBit_LEPSUSY with gambit" {
local test=ColliderBit_LEPSUSY
local yaml=./yaml/$test.yaml
source_yaml "$yaml"
run gambit_id_ascii_files "$yaml" "$Test_gambit" "$Test_expected" "$Test_rtol"
[ $status = 0 ]
}
@test "ColliderBit_eventloop with gambit" {
local test=ColliderBit_eventloop
local yaml=./yaml/$test.yaml
source_yaml "$yaml"
run gambit_id_ascii_files "$yaml" "$Test_gambit" "$Test_expected" "$Test_rtol"
[ $status = 0 ]
}
@test "DecayBit_MSSM20 with gambit" {
local test=DecayBit_MSSM20_BATS
local yaml=./yaml/$test.yaml
source_yaml "$yaml"
run gambit_id_ascii_files "$yaml" "$Test_gambit" "$Test_expected" "$Test_rtol"
[ $status = 0 ]
}
@test "PrecisionBit_MSSM20 with gambit" {
local test=PrecisionBit_MSSM20_BATS
local yaml=./yaml/$test.yaml
source_yaml "$yaml"
run gambit_id_ascii_files "$yaml" "$Test_gambit" "$Test_expected" "$Test_rtol"
[ $status = 0 ]
}
@test "Key.dat file from gambit" {
skip "I suspect this file shoudn't be generated but skip for now"
local test=DarkBit_lnL_oh2
local yaml=./yaml/$test.yaml
source_yaml "$yaml"
run gambit_id_ascii_files "$yaml" "$Test_gambit" "$Test_expected" "$Test_rtol"
[ ! -e Key.dat ]
}
# ScannerBit tests
@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 ]
}
@test "ScannerBit_diver with gambit" {
local test=ScannerBit_diver
local yaml=./yaml/$test.yaml
source_yaml "$yaml"
run gambit_id_ascii_files "$yaml" "$Test_gambit" "$Test_expected" "$Test_rtol"
[ $status = 0 ]
}