README.md 2.63 KB
Newer Older
Jeff Booher-Kaeding's avatar
Jeff Booher-Kaeding committed
1
# SCT_Parser
2

Vincent Stehlé's avatar
Vincent Stehlé committed
3
This is an external parser script for UEFI SCT. (WIP)
4

5
It's designed to read a `.ekl` results log from an UEFI SCT run, and a generated `.seq` from UEFI SCT configurator.
Jeff Booher-Kaeding's avatar
V1.0?    
Jeff Booher-Kaeding committed
6

7
It will proceed to generate a Markdown file listing number of failures, passes, each test from the sequence file set that was Silently dropped, and a list of all failures and warnings.
8
9


10
## Usage
Vincent Stehlé's avatar
Vincent Stehlé committed
11
Usage to generate a "result md" is such. `python3 parser.py <log_file.ekl> <seq_file.seq>`
12
If you do no provided any command line arguments it will use `sample.ekl` and `sample.seq`.
Vincent Stehlé's avatar
Vincent Stehlé committed
13
The output filename can be specified with `--md <filename>`.
Jeffrey Booher-Kaeding's avatar
Jeffrey Booher-Kaeding committed
14

Vincent Stehlé's avatar
Vincent Stehlé committed
15
An online help is available with the `-h` option.
Jeff Booher-Kaeding's avatar
V1.0?    
Jeff Booher-Kaeding committed
16

17
### Custom search
Vincent Stehlé's avatar
Vincent Stehlé committed
18
For a custom Key:value search, the next two arguments *MUST be included together.* The program will search and display files that met that constraint, without the crosscheck, and display the names, guid, and key:value to the command line. `python3 parser.py <file.ekl> <file.seq> <search key> <search value>`
Jeff Booher-Kaeding's avatar
V1.0?    
Jeff Booher-Kaeding committed
19

Vincent Stehlé's avatar
Vincent Stehlé committed
20
you can use the `test_dict` below to see available keys.
21

Vincent Stehlé's avatar
Vincent Stehlé committed
22
### Sorting data
23

Vincent Stehlé's avatar
Vincent Stehlé committed
24
25
26
It is possible to sort the tests data before output using
the `--sort <key1,key2,...>` option.
Sorting the test data helps when comparing results with diff.
27

Vincent Stehlé's avatar
Vincent Stehlé committed
28
Example command:
29

Vincent Stehlé's avatar
Vincent Stehlé committed
30
31
32
33
``` {.sh}
$ ./parser.py --sort \
      'group,descr,set guid,test set,sub set,guid,name,log' ...
```
34

Jeffrey Booher-Kaeding's avatar
Jeffrey Booher-Kaeding committed
35
36
## Notes
### Known Issues:
Jeff Booher-Kaeding's avatar
V1.0?    
Jeff Booher-Kaeding committed
37
* "comment" is currently not implemented, as formatting is not currently consistent, should reflect the comments from the test.
38
39
* some SCT tests have shared GUIDs,
* some lines in ekl file follow Different naming Conventions
Vincent Stehlé's avatar
Vincent Stehlé committed
40
* some tests in the sequence file are not strongly Associated with the test spec.
41

42
43
44
45
### Documentation

It is possible to convert this `README.md` into `README.pdf` with pandoc using
`make doc`. See `make help`.
46

47
48
### 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.
49
* look into large number of dropped tests.
50
51
52


### db structure:
Vincent Stehlé's avatar
Vincent Stehlé committed
53
``` {.python}
54
55
56
57
tests = [
    test_dict,
    est_dict2...
]
Jeff Booher-Kaeding's avatar
V1.0?    
Jeff Booher-Kaeding committed
58

59
60
61
62
test_dict = {
   "name": "some test",
   "result": "pass/fail",
   "group": "some group",
Vincent Stehlé's avatar
Vincent Stehlé committed
63
   "test set": "some set",
64
65
66
   "sub set": "some subset",
   "set guid": "XXXXXX",
   "guid": "XXXXXX",
Jeff Booher-Kaeding's avatar
V1.0?    
Jeff Booher-Kaeding committed
67
   "comment": "some comment",
68
69
70
71
   "log": "full log output"
}


Vincent Stehlé's avatar
Vincent Stehlé committed
72
seqs = {
73
74
75
76
77
78
79
80
81
82
    <guid> : seq_dict
    <guid2> : seq_dict2...
}

seq_dict = {
                "name": "set name",
                "guid": "set guid",
                "Iteration": "some hex/num of how many times to run",
                "rev": "some hex/numb",
                "Order": "some hex/num"
Jeff Booher-Kaeding's avatar
V1.0?    
Jeff Booher-Kaeding committed
83
}
84
```