diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/builder/ParserOptions.py b/cross-project-tests/debuginfo-tests/dexter/dex/builder/ParserOptions.py --- a/cross-project-tests/debuginfo-tests/dexter/dex/builder/ParserOptions.py +++ b/cross-project-tests/debuginfo-tests/dexter/dex/builder/ParserOptions.py @@ -38,11 +38,12 @@ def add_builder_tool_arguments(parser): - parser.add_argument('--binary', - metavar="", - help='provide binary file to override --builder') + build_group = parser.add_mutually_exclusive_group(required=True) + build_group.add_argument('--binary', + metavar="", + help='provide binary file instead of --builder') - parser.add_argument( + build_group.add_argument( '--builder', type=str, choices=sorted(_find_build_scripts().keys()), diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py --- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py +++ b/cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py @@ -54,15 +54,11 @@ def handle_options(self, defaults): options = self.context.options - # We accept either or both of --binary and --builder. - if not options.binary and not options.builder: - raise Error('expected --builder or --binary') + if not options.builder and (options.cflags or options.ldflags): + warn(self.context, '--cflags and --ldflags will be ignored when not' + ' using --builder') - # --binary overrides --builder if options.binary: - if options.builder: - warn(self.context, "overriding --builder with --binary\n") - options.binary = os.path.abspath(options.binary) if not os.path.isfile(options.binary): raise Error('could not find binary file "{}"'