Skip to content

Update to checkin-test.py to allow more user customization

James Willenbring requested to merge tjfulle:topics/checkin-script into develop

Created by: tjfulle

The pushed modifications allow:

  1. Reading in --project-configuration from files without .py extension by adding a load_source function that calls the imp.load_source function. If that call fails, it falls back to the previous method of calling __import__ directly. Motivation: It's convenient to name configuration files with extensions other than .py.

  2. Reading local command line arguments from --project-configuration (in addition to checkinTestDir/local-checkin-test-defaults.py). Motivation: It's convenient to provide a single configuration file that also provideds defaults for command line arguments. Because of the way that checkin-test.py sets defaults for several command line arguments (no-enable-fwd-packages, for example), it makes more sense to provide the defaults as a separate list that is read in after the command line parser has been instantiated and setup, rather than provide the defaults in configuration['defaults'](otherwise, you have to set '--no-enable-fwd-packages'=False so that it ends up being True...)

Merge request reports