diff --git a/v2.5/generators/nlojet++/interface/check/Makefile.am b/v2.5/generators/nlojet++/interface/check/Makefile.am index b5a7792fb91327fa71ca59b5f36cfdbfb8818d45..e9a9c3cdf8cad1abc4582b30a7101d9a8e08274e 100644 --- a/v2.5/generators/nlojet++/interface/check/Makefile.am +++ b/v2.5/generators/nlojet++/interface/check/Makefile.am @@ -15,7 +15,7 @@ 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 fnlo-compare-tables.py -TESTS_ENVIRONMENT = LIBDIR=$(libdir) PYTHONPATH=$(shell fnlo-tk-config --pythondir) +TESTS_ENVIRONMENT = LIBDIR=$(shell fnlo-tk-config --libdir) PYTHONPATH=$(shell fnlo-tk-config --pythondir) TESTS = $(dist_check_SCRIPTS) # Additional clean up for check targets diff --git a/v2.5/generators/nlojet++/interface/check/fnlo-compare-tables.py b/v2.5/generators/nlojet++/interface/check/fnlo-compare-tables.py index 7d2e6ba87bd0675d4c7d6f911540d0955532a28b..f00bbcce311eacc3896cb96c5bc29274fc0b88aa 100755 --- a/v2.5/generators/nlojet++/interface/check/fnlo-compare-tables.py +++ b/v2.5/generators/nlojet++/interface/check/fnlo-compare-tables.py @@ -10,6 +10,7 @@ except ModuleNotFoundError: sys.exit(77) LIBDIR = os.environ["LIBDIR"] +DATADIR = f"{os.path.dirname(os.path.abspath(__file__))}/../data/check/" TYPES = ["fix", "flex"] NAMES = ["NodesPerBin", "NodeDensity"] @@ -18,13 +19,13 @@ SEEDS = [1000, 2000] # fnlo.SetGlobalVerbosity(fnlo.DEBUG) os.system("rm -rf output") -os.system("ln -s input/InclusiveNJets_InclusiveJets_fix.wrm") -os.system("ln -s input/InclusiveNJets_InclusiveJets_flex.wrm") +os.system(f"ln -sf {DATADIR}InclusiveNJets_InclusiveJets_fix.wrm") +os.system(f"ln -sf {DATADIR}InclusiveNJets_InclusiveJets_flex.wrm") def generate_table(vartype: str, name: str, seed: int): - os.system(f"ln -sf input/{vartype}_{name}.str InclusiveNJets.str") - print(f"Asserting that steering file InclusiveNJets.str exists") + os.system(f"ln -sf {DATADIR}{vartype}_{name}.str InclusiveNJets.str") + print("Asserting that steering file InclusiveNJets.str exists") assert os.path.exists("InclusiveNJets.str") os.system( "nlojet++ " diff --git a/v2.5/generators/nlojet++/interface/check/fnlo-nj-lotest.pl.in b/v2.5/generators/nlojet++/interface/check/fnlo-nj-lotest.pl.in index 105bbc19f64259875599a9b0dd798f53726e68c0..96b1ea9387337cf2ce73a039a7f8d56db96e48d1 100755 --- a/v2.5/generators/nlojet++/interface/check/fnlo-nj-lotest.pl.in +++ b/v2.5/generators/nlojet++/interface/check/fnlo-nj-lotest.pl.in @@ -69,7 +69,7 @@ $ret = system("$cmd"); if ( $ret ) {die "fnlo-tk-nlotest: Ungzipping test table ${tabgz} failed: $ret, aborted!\n";} # Determine difference to default LO table -$cmd = "./compare-table-helper.py ./${tabl} output/${tabl} > lodiff.log"; +$cmd = "${src}/../data/check/compare-table-helper.py ./${tabl} output/${tabl} > lodiff.log"; print "Executing command: $cmd\n"; $ret = system("$cmd"); if ( $ret == 77 ) { diff --git a/v2.5/generators/nlojet++/interface/check/fnlo-nj-nlotest.pl.in b/v2.5/generators/nlojet++/interface/check/fnlo-nj-nlotest.pl.in index 2018db4294474ee7420726c7e2a00aaa51a568ce..3ea7072a76301f117fd5464eafb60a459b45d59e 100755 --- a/v2.5/generators/nlojet++/interface/check/fnlo-nj-nlotest.pl.in +++ b/v2.5/generators/nlojet++/interface/check/fnlo-nj-nlotest.pl.in @@ -69,7 +69,7 @@ $ret = system("$cmd"); if ( $ret ) {die "fnlo-tk-nlotest: Ungzipping test table ${tabgz} failed: $ret, aborted!\n";} # Determine difference to default NLO table -$cmd = "./compare-table-helper.py ./${tabn} output/${tabn} > lodiff.log"; +$cmd = "${src}/../data/check/compare-table-helper.py ./${tabn} output/${tabn} > lodiff.log"; print "Executing command: $cmd\n"; $ret = system("$cmd"); if ( $ret == 77 ) { diff --git a/v2.5/generators/nlojet++/interface/check/input/InclusiveNJets_InclusiveJets_fix.wrm b/v2.5/generators/nlojet++/interface/data/check/InclusiveNJets_InclusiveJets_fix.wrm similarity index 100% rename from v2.5/generators/nlojet++/interface/check/input/InclusiveNJets_InclusiveJets_fix.wrm rename to v2.5/generators/nlojet++/interface/data/check/InclusiveNJets_InclusiveJets_fix.wrm diff --git a/v2.5/generators/nlojet++/interface/check/input/InclusiveNJets_InclusiveJets_flex.wrm b/v2.5/generators/nlojet++/interface/data/check/InclusiveNJets_InclusiveJets_flex.wrm similarity index 100% rename from v2.5/generators/nlojet++/interface/check/input/InclusiveNJets_InclusiveJets_flex.wrm rename to v2.5/generators/nlojet++/interface/data/check/InclusiveNJets_InclusiveJets_flex.wrm diff --git a/v2.5/generators/nlojet++/interface/data/check/Makefile.am b/v2.5/generators/nlojet++/interface/data/check/Makefile.am index f00b8519ad50123a71f1eda8d00c07b71a9eb166..d6d04ceef0bd1e0a93870c532a1870a4efe1a02b 100644 --- a/v2.5/generators/nlojet++/interface/data/check/Makefile.am +++ b/v2.5/generators/nlojet++/interface/data/check/Makefile.am @@ -15,7 +15,9 @@ AUTOMAKE_OPTIONS = gnu # warmup.txt --> fnr0001midpHT_I723509_v23_fix_InclusiveNJets_warmup.txt # born.tab.gz --> fnr0001midpHT_I723509_v23_fix-hhc-born-2jet.tab.gz # nlo.tab.gz --> fnr0001midpHT_I723509_v23_fix-hhc-nlo-2jet.tab.gz -dist_check_DATA = steer.str warmup.txt born.tab.gz nlo.tab.gz +dist_check_DATA = steer.str warmup.txt born.tab.gz nlo.tab.gz compare-table-helper.py \ + fix_NodeDensity.str fix_NodesPerBin.str InclusiveNJets_InclusiveJets_fix.wrm \ + flex_NodeDensity.str flex_NodesPerBin.str InclusiveNJets_InclusiveJets_flex.wrm # Files that are required to build the project but that can be # recreated IF the necessary autotools etc. are available by: diff --git a/v2.5/generators/nlojet++/interface/check/compare-table-helper.py b/v2.5/generators/nlojet++/interface/data/check/compare-table-helper.py similarity index 100% rename from v2.5/generators/nlojet++/interface/check/compare-table-helper.py rename to v2.5/generators/nlojet++/interface/data/check/compare-table-helper.py diff --git a/v2.5/generators/nlojet++/interface/check/input/fix_NodeDensity.str b/v2.5/generators/nlojet++/interface/data/check/fix_NodeDensity.str similarity index 100% rename from v2.5/generators/nlojet++/interface/check/input/fix_NodeDensity.str rename to v2.5/generators/nlojet++/interface/data/check/fix_NodeDensity.str diff --git a/v2.5/generators/nlojet++/interface/check/input/fix_NodesPerBin.str b/v2.5/generators/nlojet++/interface/data/check/fix_NodesPerBin.str similarity index 100% rename from v2.5/generators/nlojet++/interface/check/input/fix_NodesPerBin.str rename to v2.5/generators/nlojet++/interface/data/check/fix_NodesPerBin.str diff --git a/v2.5/generators/nlojet++/interface/check/input/flex_NodeDensity.str b/v2.5/generators/nlojet++/interface/data/check/flex_NodeDensity.str similarity index 100% rename from v2.5/generators/nlojet++/interface/check/input/flex_NodeDensity.str rename to v2.5/generators/nlojet++/interface/data/check/flex_NodeDensity.str diff --git a/v2.5/generators/nlojet++/interface/check/input/flex_NodesPerBin.str b/v2.5/generators/nlojet++/interface/data/check/flex_NodesPerBin.str similarity index 100% rename from v2.5/generators/nlojet++/interface/check/input/flex_NodesPerBin.str rename to v2.5/generators/nlojet++/interface/data/check/flex_NodesPerBin.str