Added exclusion for test suite builds - excluded tests still built, but not put into SuiteMaker. Usage is make EXCLUDE=<comma-separated list of tests, e.g. IdentityListTests,TrustwordsTests> - I don't promise there's not some fragility, but it should work.
authorKrista Bennett <krista@pep-project.org>
Thu, 13 Sep 2018 12:16:07 +0200
changeset 294123726372aea0
parent 2937 441d5dceee62
child 2943 dd40810a7490
child 2949 99359f6aa025
child 2960 2e282c20ec11
child 2961 d30983446c45
Added exclusion for test suite builds - excluded tests still built, but not put into SuiteMaker. Usage is make EXCLUDE=<comma-separated list of tests, e.g. IdentityListTests,TrustwordsTests> - I don't promise there's not some fragility, but it should work.
test/Makefile
test/gensuitemaker.py
     1.1 --- a/test/Makefile	Mon Sep 10 15:11:12 2018 +0200
     1.2 +++ b/test/Makefile	Thu Sep 13 12:16:07 2018 +0200
     1.3 @@ -93,7 +93,12 @@
     1.4  ifndef PY_ENV
     1.5  	@echo "WARNING: Can't find python3 - this is fine unless you're adding test suites. If so, please install python3."
     1.6  else
     1.7 +ifndef EXCLUDE
     1.8  	$(PY_ENV) gensuitemaker.py
     1.9 +else
    1.10 +	# Comma-separated list, no spaces
    1.11 +	$(PY_ENV) gensuitemaker.py --exclude=$(EXCLUDE)
    1.12 +endif
    1.13  endif
    1.14  		
    1.15  .PHONY: test_home_
     2.1 --- a/test/gensuitemaker.py	Mon Sep 10 15:11:12 2018 +0200
     2.2 +++ b/test/gensuitemaker.py	Thu Sep 13 12:16:07 2018 +0200
     2.3 @@ -1,6 +1,6 @@
     2.4  # This file is under GNU General Public License 3.0
     2.5  # see LICENSE.txt
     2.6 -
     2.7 +import argparse
     2.8  from os import listdir, getcwd
     2.9  from os.path import isfile, join
    2.10  from re import sub
    2.11 @@ -14,11 +14,23 @@
    2.12  
    2.13  indent = "    "
    2.14  
    2.15 +parser = argparse.ArgumentParser()
    2.16 +parser.add_argument("--exclude", "-x", help="Comma-separated list of tests to exclude from test suite build")
    2.17 +
    2.18 +args = parser.parse_args()
    2.19 +
    2.20 +exclude_arg = args.exclude
    2.21 +exclude_list = []
    2.22 +if exclude_arg:
    2.23 +    exclude_list = exclude_arg.split(",")
    2.24 +    for x in exclude_list:
    2.25 +        x.replace(" ","")
    2.26  for f in ls:
    2.27      if isfile(join(srcpath, f)):
    2.28          if (f.endswith(".cc")):
    2.29              suite = sub('\.cc$', '', f)
    2.30 -            suites.append(suite)
    2.31 +            if not suite in exclude_list:
    2.32 +                suites.append(suite)
    2.33  
    2.34  license = (''
    2.35  '// This file is under GNU General Public License 3.0\n'