Unverified Commit c430cc51 authored by Jeffrey Booher-Kaeding's avatar Jeffrey Booher-Kaeding Committed by GitHub
Browse files

Merge pull request #3 from vstehle/for-jeffrey

parents 17f614b9 54a838da
*.pdf
/result.md
# Simple makefile to generate the documentation with pandoc.
.PHONY: all doc help clean
all: doc
help:
@echo 'Targets:'
@echo ' all'
@echo ' clean'
@echo ' doc Generate README.pdf'
@echo ' help Print this help.'
doc: README.pdf
%.pdf: %.md pandoc.yaml
pandoc -o$@ $< pandoc.yaml
clean:
-rm -f README.pdf
#!/usr/bin/env python3
#SCT log parser
import sys
import json
#based loosley on https://stackoverflow.com/a/4391978
# returns a filtered dict of dicts that meet some Key-value pair.
......@@ -26,7 +26,7 @@ def test_parser(string,current_group,current_test_set,current_set_guid,current_s
"set guid": current_set_guid,
"guid": string[0], #FIXME:GUID's overlap
#"comment": string[-1], #FIXME:need to hash this out, sometime there is no comments
"log": ' '.join(string)
"log": ' '.join(string[3:])
}
return test_list
......@@ -41,11 +41,18 @@ def ekl_parser (file):
current_sub_set = "N/A"
for line in file:
# Strip the line from trailing whitespaces
line = line.rstrip()
# Skip empty line
if line == '':
continue
#strip the line of | & || used for sepration
split_line = [string for string in line.split('|') if string != ""]
#TODO:I can skip TERM, but I feel like "\n" should be able to be handled in the above list comprehension
if split_line[0]=="TERM" or split_line[0]=="\n":
# Skip TERM
if split_line[0] == "TERM":
continue
#The "HEAD" tag is the only indcation we are on a new test set
......@@ -54,7 +61,7 @@ def ekl_parser (file):
try:
current_group, current_set = split_line[8].split('\\')
except:
current_group, current_set =split_line[8],split_line
current_group, current_set = '', split_line[8]
current_set_guid = split_line[4]
current_sub_set = split_line[6]
......@@ -178,11 +185,13 @@ def main():
# generate MD summary
with open('result.md', 'w') as resultfile:
resultfile.write("# SCT Summary \n")
resultfile.write("### 1. Dropped: "+str(len(would_not_run))+"\n")
resultfile.write("### 2. Failures: "+str(len(failures))+"\n")
resultfile.write("### 3. Warnings: "+str(len(warnings))+"\n")
resultfile.write("### 4. Passes: "+str(len(passes))+"\n")
resultfile.write("# SCT Summary \n\n")
resultfile.write("| | |\n")
resultfile.write("|--|--|\n")
resultfile.write("|Dropped:|" + str(len(would_not_run)) + "|\n")
resultfile.write("|Failures:|" + str(len(failures)) + "|\n")
resultfile.write("|Warnings:|" + str(len(warnings)) + "|\n")
resultfile.write("|Passes:|" + str(len(passes)) + "|\n")
resultfile.write("\n\n")
resultfile.write("## 1. Silently dropped or missing")
......
......@@ -30,6 +30,10 @@ you can use the `test_dict` below to see available keys.
* some lines in ekl file follow Different naming Conventions
* some tests in the sequence file are not strongly Associated with the test spec.
### Documentation
It is possible to convert this `README.md` into `README.pdf` with pandoc using
`make doc`. See `make help`.
### TODO:
* double check concatenation of all `.ekl` logs, preliminary tests show small Divergence between them and `summary.ekl` found in `Overall` folder. Cat.sh will generate this file.
......@@ -37,7 +41,7 @@ you can use the `test_dict` below to see available keys.
### db structure:
```
``` {.python}
tests = [
test_dict,
est_dict2...
......
---
toc: true
urlcolor: blue
---
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