Adding coverage only on full test
This commit is contained in:
parent
a41c76fcd0
commit
630259881d
@ -8,6 +8,9 @@ release:
|
||||
cp -v $(OUTDIR)/testrun.json ../smart_brain/_testresults_
|
||||
cp -v $(OUTDIR)/coverage.xml ../smart_brain/_testresults_
|
||||
|
||||
clean_coverage:
|
||||
rm -v testresults/coverage.xml
|
||||
|
||||
single: test_single pdf view clean
|
||||
@echo FINISHED...
|
||||
|
||||
@ -17,7 +20,7 @@ smoke: test_smoke pdf view clean
|
||||
short: test_short pdf view clean
|
||||
@echo FINISHED...
|
||||
|
||||
full: test_full pdf view clean
|
||||
full: clean_coverage test_full pdf view clean
|
||||
@echo FINISHED...
|
||||
|
||||
test_single:
|
||||
|
@ -54,7 +54,9 @@ if __name__ == "__main__":
|
||||
#
|
||||
# Testsuite
|
||||
#
|
||||
ts = tests.help.testSession(mc, tcel=tcel.get(args.level))
|
||||
test_level = tcel.get(args.level)
|
||||
add_coverage = test_level == report.TCEL_FULL
|
||||
ts = tests.help.testSession(mc, tcel=test_level)
|
||||
# Add and run tests
|
||||
tests.add_all_testcases(ts, mc, h)
|
||||
|
||||
@ -65,10 +67,11 @@ if __name__ == "__main__":
|
||||
#
|
||||
# Stop smart_brain execution
|
||||
mc.send(STOP_EXECUTION_TOPIC, json.dumps(True))
|
||||
time.sleep(2) # give smart_brain time to create coverage xml file
|
||||
if add_coverage:
|
||||
time.sleep(2) # give smart_brain time to create coverage xml file
|
||||
#
|
||||
coverage_file = os.path.join(BASEPATH, "testresults", "coverage.xml")
|
||||
if os.path.exists(coverage_file):
|
||||
if os.path.exists(coverage_file) and add_coverage:
|
||||
ts.full_test_data[unittest.jsonlog.MAIN_KEY_COVERAGE_INFO] = unittest.run.coverage_info(coverage_file, None)
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user