|author||Diana Picus <email@example.com>||2018-02-19 19:14:00 +0100|
|committer||Diana Picus <firstname.lastname@example.org>||2018-02-22 11:47:12 +0100|
build-and-test: Allow flags to be read from files
Use the built-in support from the argparse module to allow our subcommand to read flags from configuration files. This is achieved by specifying a prefix (in our case '@') that indicates to argparse that it should read arguments from the file ('@filepath'), one per line. They are then processed as if they had been given on the command line in the position where the filename is. This makes it possible for flags in the file to override or be overriden by flags given on the command line, depending on their position relative to the filename. Flags that accumulate all the values that they receive cannot be overriden, but will instead accumulate everything regardless of whether it came from the command line or the file. Change-Id: I22a9a92a0f5ba49dd085ef5860c37bd4fc1009e1
Diffstat (limited to 'scripts')
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/llvm.py b/scripts/llvm.py
index 8d9a4c1..1962293 100644
@@ -471,6 +471,7 @@ runTestSuite.set_defaults(run_command=run_the_test_suite)
buildAndTest = subcommands.add_parser(
'build-and-test', # TODO: This really needs a better name...
help="Run complex build scenarios with one or two stages of clang and "
"optionally a test-suite run. This should be flexible enough to allow "
"us to reproduce any buildbot configuration, but it can obviously be "