Skip to content
Snippets Groups Projects
Commit 908acd7d authored by JohannesGaessler's avatar JohannesGaessler
Browse files

Moved test files to v2.5/generators/NLOJet++/

parent f2bd64e8
Branches bin_density
No related tags found
No related merge requests found
Showing
with 27 additions and 33 deletions
.DS_Store
.idea
*.log
tmp/
output
InclusiveNJets.str
......@@ -3,3 +3,5 @@ fnlo-nj-*.pl
fnlo-nj-*.trs
*.tab
*.tab.gz
output
InclusiveNJets.str
......@@ -14,7 +14,8 @@ AUTOMAKE_OPTIONS = gnu
#
# perl script targets to check the package (distributed, but not installed)
#
dist_check_SCRIPTS = fnlo-nj-wrmtest.pl fnlo-nj-lotest.pl fnlo-nj-nlotest.pl
dist_check_SCRIPTS = fnlo-nj-wrmtest.pl fnlo-nj-lotest.pl fnlo-nj-nlotest.pl fnlo-compare-tables.py
TESTS_ENVIRONMENT = LIBDIR=$(libdir)
TESTS = $(dist_check_SCRIPTS)
# Additional clean up for check targets
......
#!/usr/bin/env python3
import os
import sys
import fastnlo as fnlo
LIBDIR = os.environ["LIBDIR"]
fnlo.SetGlobalVerbosity(fnlo.DEBUG)
table_1 = fnlo.fastNLOTable(sys.argv[1])
table_2 = fnlo.fastNLOTable(sys.argv[2])
assert table_1.IsEquivalent(table_2, 1e-8)
......@@ -4,6 +4,8 @@ import os
import fastnlo as fnlo
LIBDIR = os.environ["LIBDIR"]
TYPES = ["fix", "flex"]
NAMES = ["NodesPerBin", "NodeDensity"]
SEEDS = [1000, 2000]
......@@ -21,9 +23,9 @@ def generate_table(vartype: str, name: str, seed: int):
"-c born "
f"-s {seed} "
f"--name {vartype}_{name}_{seed:06d} "
" -u /usr/lib/fastnlo_interface_nlojet/libInclusiveNJets.la "
"--max-event 100000 "
"--save-after 100000 "
f" -u {LIBDIR}/fastnlo_interface_nlojet/libInclusiveNJets.la "
"--max-event 10000 "
"--save-after 10000 "
)
os.system(f"mv output/run-hhc-born-2jet.tab.gz output/{vartype}_{name}_{seed:06d}.tab.gz")
......
......@@ -69,19 +69,10 @@ $ret = system("$cmd");
if ( $ret ) {die "fnlo-tk-nlotest: Ungzipping test table ${tabgz} failed: $ret, aborted!\n";}
# Determine difference to default LO table
$cmd = "diff ./${tabl} output/${tabl} > lodiff.log";
$cmd = "./compare-table-helper.py ./${tabl} output/${tabl} > lodiff.log";
print "Executing command: $cmd\n";
$ret = system("$cmd");
if ( $ret ) {die "fnlo-nj-lotest: Result comparison with 'diff' failed: $ret, aborted!\n";}
# The diff.log must be empty
if ( ! -z "lodiff.log" ) {
print "fnlo-nj-lotest: LO test table differs from default:\n";
$cmd = "cat lodiff.log";
print "Executing command: $cmd\n";
$ret = system("$cmd");
die "fnlo-nj-lotest: LO table production unit test failed, please fix!\n";
}
if ( $ret ) {die "fnlo-nj-lotest: LO table production unit test failed, results are different!\n";}
print "fnlo-nj-lotest: LO table production unit test passed.\n";
......
......@@ -69,19 +69,10 @@ $ret = system("$cmd");
if ( $ret ) {die "fnlo-tk-nlotest: Ungzipping test table ${tabgz} failed: $ret, aborted!\n";}
# Determine difference to default NLO table
$cmd = "diff ./${tabn} output/${tabn} > nlodiff.log";
$cmd = "./compare-table-helper.py ./${tabn} output/${tabn} > lodiff.log";
print "Executing command: $cmd\n";
$ret = system("$cmd");
if ( $ret ) {die "fnlo-nj-nlotest: Result comparison with 'diff' failed: $ret, aborted!\n";}
# The diff.log must be empty
if ( ! -z "nlodiff.log" ) {
print "fnlo-nj-nlotest: NLO test table differs from default:\n";
$cmd = "cat nlodiff.log";
print "Executing command: $cmd\n";
$ret = system("$cmd");
die "fnlo-nj-nlotest: NLO table production unit test failed, please fix!\n";
}
if ( $ret ) {die "fnlo-nj-lotest: NLO table production unit test failed, results are different!\n";}
print "fnlo-nj-nlotest: NLO table production unit test passed.\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment