summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test-chill/Makefile2
-rw-r--r--test-chill/coverage.py11
-rw-r--r--test-chill/testchill/__main__.py8
-rw-r--r--test-chill/testchill/chill.py2
4 files changed, 17 insertions, 6 deletions
diff --git a/test-chill/Makefile b/test-chill/Makefile
index 6fc543b..d7238e8 100644
--- a/test-chill/Makefile
+++ b/test-chill/Makefile
@@ -83,7 +83,7 @@ endif
DIRTY_EXTS=pyc o log pickle
DIRTY_FILES=$(foreach de,$(DIRTY_EXTS),$(shell find . -name "*.$(de)"))
-DIRTY_DIRS=$(shell find . -name '__pycache__' -and -type d) $(STAGING_DIR) pylang
+DIRTY_DIRS=$(shell find . -name '__pycache__' -and -type d) $(STAGING_DIR) pylang coverage_report
CORE_TESTS:=_extract util gcov _cpp_validate_env cpp_validate test __main__
OMEGA_TESTS:=omega
diff --git a/test-chill/coverage.py b/test-chill/coverage.py
index 9941a9a..8ff5af8 100644
--- a/test-chill/coverage.py
+++ b/test-chill/coverage.py
@@ -36,6 +36,14 @@ def print_nonexec(argsns, cov):
print('{}: {}'.format(str(lineno).rjust(5), code))
+def print_full_nonexec(argsns, cov):
+ for filename in cov.filenames:
+ with open('coverage_report/' + filename + '.txt', 'w') as f:
+ minline, maxline = map(int,argsns.linerange)
+ for lineno, count, code in linerange(nonexecuted(cov, filename), minline, maxline):
+ f.write('{}: {}\n'.format(str(lineno).rjust(5),code))
+
+
def make_argparser():
arg_parser = argparse.ArgumentParser('coverage.py')
cmd_parser_set = arg_parser.add_subparsers()
@@ -43,6 +51,9 @@ def make_argparser():
nonexec_cmd.add_argument('-f', dest='filename', default=None)
nonexec_cmd.add_argument('-r', dest='linerange', nargs=2, default=(0, 120000), metavar='STARTLINE ENDLINE')
nonexec_cmd.set_defaults(func=print_nonexec)
+ full_nonexec_cmd = cmd_parser_set.add_parser('full_nonexec')
+ full_nonexec_cmd.add_argument('-r', dest='linerange', nargs=2, default=(0, 120000), metavar='STARTLINE ENDLINE')
+ full_nonexec_cmd.set_defaults(func=print_full_nonexec)
return arg_parser
diff --git a/test-chill/testchill/__main__.py b/test-chill/testchill/__main__.py
index 3e03e11..8af5b9c 100644
--- a/test-chill/testchill/__main__.py
+++ b/test-chill/testchill/__main__.py
@@ -316,8 +316,8 @@ def add_global_args(arg_parser):
"""
arg_parser.add_argument('-w', '--working-dir', dest='wd', default=os.getcwd(), help='The working directory. (Defaults to the current directory)', metavar='working-directory')
arg_parser.add_argument('-R', '--rose-home', dest='rose_dir', default=os.getenv('ROSEHOME'), help='Rose home directory. (Defaults to ROSEHOME)', metavar='rose-home')
- arg_parser.add_argument('-C', '--chill-home', dest='chill_dir', default=os.getenv('CHILLHOME'), help='Chill home directory. (Defaults to CHILLHOME)', metavar='chill-home')
- arg_parser.add_argument('-O', '--omega-home', dest='omega_dir', default=os.joinpath(os.getcwd(), '../omega'), help='Omega home directory. (Defaults to ../omega)', metavar='omega-home')
+ arg_parser.add_argument('-C', '--chill-home', dest='chill_dir', default=os.path.join(os.getcwd(), '..'), help='Chill home directory. (Defaults to CHILLHOME)', metavar='chill-home')
+ arg_parser.add_argument('-O', '--omega-home', dest='omega_dir', default=os.path.join(os.getcwd(), '../omega'), help='Omega home directory. (Defaults to ../omega)', metavar='omega-home')
arg_parser.add_argument('-b', '--binary-dir', dest='bin_dir', default=None, help='Binary directory.', metavar='bin-dir')
@util.callonce
@@ -364,8 +364,8 @@ def main():
coverage = gcov.GcovSet()
#coverage=None
results = list(test.run(args_to_tclist(coverage_set=coverage)))
- #test.pretty_print_results(results)
- #util.rmtemp()
+ test.pretty_print_results(results)
+ util.rmtemp()
#coverage.pretty_print()
with open('coverage.pickle', 'wb') as f:
diff --git a/test-chill/testchill/chill.py b/test-chill/testchill/chill.py
index b881ef4..05f3b4f 100644
--- a/test-chill/testchill/chill.py
+++ b/test-chill/testchill/chill.py
@@ -188,7 +188,7 @@ class BuildChillTestCase(test.TestCase):
if self.test_result.passed():
if self.config.bin_dir:
util.shell('mv', [os.path.join(self.config.chill_dir, self.config.make_target()), os.path.join(self.config.bin_dir, self.config.name())])
- else:
+ elif not self.config.make_target() == self.config.name():
util.shell('mv', [os.path.join(self.config.chill_dir, self.config.make_target()), os.path.join(self.config.chill_dir, self.config.name())])