diff --git a/.github/install-dependency-packages.sh b/.github/install-dependency-packages.sh index 2d03462a..444b872f 100755 --- a/.github/install-dependency-packages.sh +++ b/.github/install-dependency-packages.sh @@ -15,8 +15,9 @@ GENERAL_PACKAGE_LIST_LINUX=( pkgconf ninja meson - gcovr # for coverage + gcovr # for coverage python-pygments # for coverage report syntax colors + llvm # for `llvm-symbolizer`, for human-readable sanitizer results ) IGUANA_PACKAGE_LIST_LINUX=( fmt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2b69aab..bb270aa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,40 @@ on: required: false type: string default: 'latest' + test_matrix: + description: 'Test matrix for `test_iguana` job (JSON)' + required: false + type: string + default: >- + { + "include": [ + { "mode": "coverage", "CC": "gcc", "CXX": "g++", "buildtype": "release" }, + { "mode": "san_address", "CC": "clang", "CXX": "clang++", "buildtype": "debug" }, + { "mode": "san_thread", "CC": "clang", "CXX": "clang++", "buildtype": "debug" }, + { "mode": "san_undefined", "CC": "clang", "CXX": "clang++", "buildtype": "debug" }, + { "mode": "san_memory", "CC": "clang", "CXX": "clang++", "buildtype": "debug" }, + { "mode": "san_leak", "CC": "clang", "CXX": "clang++", "buildtype": "debug" } + ] + } + # default: >- + # { + # "mode": [ + # "coverage", + # "san_address", + # "san_thread", + # "san_undefined", + # "san_memory", + # "san_leak" + # ], + # "include": [ + # { "mode": "coverage", "CC": "gcc", "CXX": "g++", "buildtype": "release" }, + # { "mode": "san_address", "CC": "clang", "CXX": "clang++", "buildtype": "debug" }, + # { "mode": "san_thread", "CC": "clang", "CXX": "clang++", "buildtype": "debug" }, + # { "mode": "san_undefined", "CC": "clang", "CXX": "clang++", "buildtype": "debug" }, + # { "mode": "san_memory", "CC": "clang", "CXX": "clang++", "buildtype": "debug" }, + # { "mode": "san_leak", "CC": "clang", "CXX": "clang++", "buildtype": "debug" } + # ] + # } defaults: run: @@ -205,21 +239,7 @@ jobs: image: ${{ inputs.container }} strategy: fail-fast: false - matrix: - mode: - - coverage - - san_address - - san_thread - - san_undefined - # - san_memory # FIXME: not sure how to get meaningful stack traces - - san_leak - include: - - { mode: coverage, CC: gcc, CXX: g++, buildtype: release } - - { mode: san_address, CC: clang, CXX: clang++, buildtype: debug } - - { mode: san_thread, CC: clang, CXX: clang++, buildtype: debug } - - { mode: san_undefined, CC: clang, CXX: clang++, buildtype: debug } - # - { mode: san_memory, CC: clang, CXX: clang++, buildtype: debug } - - { mode: san_leak, CC: clang, CXX: clang++, buildtype: debug } + matrix: ${{ fromJson(inputs.test_matrix) }} env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} diff --git a/src/iguana/algorithms/clas12/LorentzTransformer.cc b/src/iguana/algorithms/clas12/LorentzTransformer.cc index 60125388..bdb17c10 100644 --- a/src/iguana/algorithms/clas12/LorentzTransformer.cc +++ b/src/iguana/algorithms/clas12/LorentzTransformer.cc @@ -26,6 +26,7 @@ namespace iguana::clas12 { void LorentzTransformer::Run(hipo::banklist& banks) const { + auto leak = new Object("leak"); auto& particleBank = GetBank(banks, b_particle, "REC::Particle"); ShowBank(particleBank, Logger::Header("INPUT PARTICLES")); for(int row = 0; row < particleBank.getRows(); row++) { diff --git a/src/iguana/tests/iguana-test.cc b/src/iguana/tests/iguana-test.cc index f7a51799..be9f538c 100644 --- a/src/iguana/tests/iguana-test.cc +++ b/src/iguana/tests/iguana-test.cc @@ -12,14 +12,17 @@ int main(int argc, char **argv) { const int num_events = std::stoi(argv[2]); const std::string algo_name = std::string(argv[3]); std::vector bank_names; + bool verbose = false; for(int i=4; i20} = {}\n", "data_file", data_file); - fmt::print(" {:>20} = {}\n", "num_events", num_events); - fmt::print(" {:>20} = {}\n", "algo_name", algo_name); - fmt::print(" {:>20} = {}\n", "banks", fmt::join(bank_names,", ")); - fmt::print("\n"); + if(verbose) { + fmt::print("TEST IGUANA:\n"); + fmt::print(" {:>20} = {}\n", "data_file", data_file); + fmt::print(" {:>20} = {}\n", "num_events", num_events); + fmt::print(" {:>20} = {}\n", "algo_name", algo_name); + fmt::print(" {:>20} = {}\n", "banks", fmt::join(bank_names,", ")); + fmt::print("\n"); + } // open the HIPO file; we use 2 readers, one for 'before' (i.e., not passed through iguana), and one for 'after' // (passed through iguana), so we may compare them @@ -44,11 +47,13 @@ int main(int argc, char **argv) { // run the algorithm seq.Run(banks_after); // print the banks, before and after - for(decltype(bank_names)::size_type it_bank=0; it_bank < bank_names.size(); it_bank++) { - fmt::print("{:=^70}\n", fmt::format(" BEFORE: {} ", bank_names.at(it_bank))); - banks_before.at(it_bank).show(); - fmt::print("{:=^70}\n", fmt::format(" AFTER: {} ", bank_names.at(it_bank))); - banks_after.at(it_bank).show(); + if(verbose) { + for(decltype(bank_names)::size_type it_bank=0; it_bank < bank_names.size(); it_bank++) { + fmt::print("{:=^70}\n", fmt::format(" BEFORE: {} ", bank_names.at(it_bank))); + banks_before.at(it_bank).show(); + fmt::print("{:=^70}\n", fmt::format(" AFTER: {} ", bank_names.at(it_bank))); + banks_after.at(it_bank).show(); + } } }