Skip to content

Test cleanup and accidental overahul

Dan Guest requested to merge dguest/hh4b-analysis:cleanup-test into master

This does a bunch of stuff, maybe too much:

  • Add an associative array for the configuration scripts that each test mode uses. Before we were defining new functions for each configuration, which won't really scale well.
  • Consolidate the functions to run tests a bit. Some of the functions were nearly identical, but breaking off the configuration helped here
    • Set the disable_calib flag to true in the physlite configuration: there was a whole extra function to run physlite tests with that option passed as a command line flag.
  • Make the help and options for easyjet-test a bit more friendly:
    • You can set whatever log level with -l now.
    • The usage output is a bit more terse, but the -h output will list the modes and which configuration file they use.
    • Added info on the environment variables that control the script defaults.
  • Add a (bash) tab completion script for the test script. I also added a hook to the standard CMake-generated environment setup that sources this. It should be ignored in zsh automatically.
  • Try to bring a bit of sanity to the naming conventions for the CI tests. I also made the names shorter so they don't get truncated when you look at the dashboard. This should make it a bit easier to glance at the dashboard and then run the test locally to debug.
  • Define a few environment variables to control the test script. These start with EASYJET_* so you can also just set them in your .bashrc or whatever if you don't like the default behavior.
  • Skip the config_only step in the "fast" unit tests if there's a local metadata.json file for the input already.
  • Minor cleanup for flag declarations of the form addFlag(name, lambda prev: function(prev)). There's no point in defining a lambda that just calls a callable with one argument, it should just be addFlag(name, function).
Edited by Dan Guest

Merge request reports