Commit d144d546 authored by Vincent Stehlé's avatar Vincent Stehlé
Browse files

Better handling of skipped tests sets

A skip test set is a test set, which was considered but had zero of its
tests run. This is not the same as a dropped test set, which we do not find
in the log at all.
Generate artificial test entries with the result set to SKIPPED to keep
track of the former.

Signed-off-by: Vincent Stehlé's avatarVincent Stehlé <>
parent f88b3ceb
......@@ -113,3 +113,11 @@ dropped_test_dict = {
"log": ""
#### Skipped tests sets
Skipped tests sets are the tests sets, which were considered but had zero of
their test run according to the log file.
We create artificial tests entries for those dropped tests sets, with the
"result" fields set to "SKIPPED".
......@@ -36,13 +36,14 @@ def test_parser(string, current):
def ekl_parser (file):
#create our "database" dict
temp_list = list()
#All tests are grouped by the "HEAD" line the procedes them.
current = {
'group': "N/A",
'test set': "N/A",
'sub set': "N/A",
'set guid': "N/A",
# All tests are grouped by the "HEAD" line, which precedes them.
current = {}
# Count number of tests since beginning of the set
n = 0
# Number of skipped tests sets
s = 0
for i, line in enumerate(file):
# Strip the line from trailing whitespaces
......@@ -55,8 +56,26 @@ def ekl_parser (file):
# strip the line of | & || used for sepration
split_line = line.split('|')
# Skip TERM
# TERM marks the end of a test set
# In case of empty test set we generate an artificial skipped test
# entry. Then reset current as a precaution, as well as our test
# counter.
if split_line[0] == '' and split_line[1] == "TERM":
if not n:
logging.debug(f"Skipped test set `{current['sub set']}'")
'name': '',
'guid': '',
'log': '',
'result': 'SKIPPED',
s += 1
current = {}
n = 0
# The "HEAD" tag is the only indcation we are on a new test set
......@@ -89,12 +108,16 @@ def ekl_parser (file):
#put the test into a dict, and then place that dict in another dict with GUID as key
tmp_dict = test_parser(split_test, current)
n += 1
sys.exit("your log may be corrupted")
logging.error(f"Unparsed line {i} `{line}'")
if s:
logging.debug(f'{s} skipped test set(s)')
return temp_list
#Parse Seq file, used to tell which tests should run.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment