Skip to content

Commit

Permalink
[hadd] update expectations from hadd
Browse files Browse the repository at this point in the history
  • Loading branch information
silverweed committed Dec 11, 2024
1 parent e068831 commit a53f098
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 12 deletions.
1 change: 1 addition & 0 deletions root/io/datamodelevolution/00/test2.cxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "DataModelV2.h"
#include "TFile.h"
#include "TTree.h"
#include "TBranch.h"
#include "TError.h"
#include "TBranch.h"

Expand Down
6 changes: 3 additions & 3 deletions root/io/evolution/versions/attmarker.ref
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
hadd Target file: result.root
hadd compression setting for all output: 101
Info in <hadd>: target file: result.root
Info in <hadd>: compression setting for all output: 101
hadd Source file 1: hsimple14.root
hadd Source file 2: hsimple20.root
hadd Sources and Target have different compression settings
Warning in <hadd>: Sources and Target have different compression settings
hadd merging will be slower
hadd Target path: result.root:/
19 changes: 19 additions & 0 deletions root/io/hadd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@ if(ROOT_pyroot_FOUND)
MACRO test_compression_settings.py)
ROOTTEST_ADD_TEST(input_validation
MACRO input_validation.py)
ROOTTEST_ADD_TEST(test_MergeChangeComp
COPY_TO_BUILDDIR merge_gen_input_tuples.C merge_changeComp_check_output.C
PRECMD ${ROOT_root_CMD} -q -b -l "merge_gen_input_tuples.C(\"test_comp_in1.root\", \"test_comp_in2.root\")"
COMMAND ${ROOT_hadd_CMD} -f404 test_comp_out.root test_comp_in1.root test_comp_in2.root
POSTCMD ${ROOT_root_CMD} -q -b -l "merge_changeComp_check_output.C(404, \"test_comp_out.root\", \"test_comp_in1.root\", \"test_comp_in2.root\")"
)

ROOTTEST_ADD_TEST(test_TreeChangeComp
COPY_TO_BUILDDIR hadd_gen_input_tree.C hadd_check_comp_tree.C
PRECMD ${ROOT_root_CMD} -q -b -l "hadd_gen_input_tree.C(\"test_comp_tree_in.root\")"
COMMAND ${ROOT_hadd_CMD} -f401 test_comp_tree_out.root test_comp_tree_in.root
POSTCMD ${ROOT_root_CMD} -q -b -l "hadd_check_comp_tree.C(\"test_comp_tree_out.root\", \"test_comp_tree_in.root\", 401)"
)

ROOTTEST_ADD_TEST(test_MergeNestedSameName
COPY_TO_BUILDDIR hadd_check_nested_same_name.C
COMMAND ${ROOT_root_CMD} -q -b -l "hadd_check_nested_same_name.C"
OUTREF hadd_check_nested_same_name.ref
)
endif()

# merge 2 RNTuples passing an explicit compression
Expand Down
4 changes: 2 additions & 2 deletions root/io/hadd/input_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_hadd_input_validation(self):
finally:
os.remove(outputfile)

assert f"hadd exiting due to error in {FILENAME+'_txt'}" in out.stderr.decode()
assert f"exiting due to error in {FILENAME+'_txt'}" in out.stderr.decode()

def test_hadd_input_validation_indirect(self):
"""
Expand All @@ -65,7 +65,7 @@ def test_hadd_input_validation_indirect(self):
finally:
os.remove(outputfile)

assert f"hadd exiting due to error in {FILENAME+'_txt'}" in out.stderr.decode()
assert f"exiting due to error in {FILENAME+'_txt'}" in out.stderr.decode()


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions root/io/newstl/emulatedWrite.ref
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
hadd Target file: result.root
hadd compression setting for all output: 101
Info in <hadd>: target file: result.root
Info in <hadd>: compression setting for all output: 101
hadd Source file 1: cmsJets_0.root
Warning in <TClass::Init>: no dictionary for class edm::EDProduct is available
Warning in <TClass::Init>: no dictionary for class edm::EventAux is available
Expand Down
6 changes: 3 additions & 3 deletions root/io/transient/base/hadd_autoloadLZ4.ref
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
hadd Target file: data_merge.root
hadd compression setting for all output: 4
Info in <hadd>: target file: data_merge.root
Info in <hadd>: compression setting for all output: 4
hadd Source file 1: data1.root
hadd Source file 2: data2.root
hadd Target path: data_merge.root:/
Info in <hadd>: target path: data_merge.root:/
4 changes: 2 additions & 2 deletions root/io/transient/base/hadd_autoloadZLIB.ref
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
hadd Target file: data_merge.root
hadd compression setting for all output: 101
Info in <hadd>: target file: data_merge.root
Info in <hadd>: compression setting for all output: 101
hadd Source file 1: data1.root
hadd Source file 2: data2.root
hadd Target path: data_merge.root:/

0 comments on commit a53f098

Please sign in to comment.