0b843fc2b7
gtr,parser/gotest: Move ReportBuilder to gotest package
...
The ReportBuilder was made specifically for building a gtr.Report from
parsed go test output. At this point it's unclear whether this will be
reusable if we ever introduce other parser. For now let's move it closer
to where it's used and let's not make it part of the public API yet.
2022-03-27 23:55:59 +01:00
26cb3d5eb3
Print JSON instead of raw Go structs for -debug.print-events
2022-03-22 22:41:50 +00:00
b0a9864d1e
parser/gotest: Add Option to override the timestamp function
...
By default, the current local time is used when generating a Report. The
TimestampFunc Option makes it possible to override this default
behaviour. This can for example be used in tests to make sure the
timestamp is a fixed point in time.
2022-03-22 22:05:23 +00:00
c78e04707f
gtr,parser/gotest: move Event and building a report to parser/gotest
...
The Parse method now directly returns a report, rather than a list of
events that then need to be converted into a report. As part of this
change, the Event struct has also been moved to the gotest package. It's
now the responsibility of the parser to construct a gtr.Report.
2022-03-22 22:05:23 +00:00
832cc97037
parser/gotest: refactor parser so Parse is no longer a top level func
...
Making Parse a method on a Parser struct makes it possible to later
define an common parser interface.
2022-03-22 22:05:23 +00:00
24c2ee41ce
parser/gotest: refactor tests to run one test per input line
2022-03-22 22:05:23 +00:00
a70d508a2e
parser/gotest: support parsing test summaries when there were no tests
2022-03-20 22:35:50 +00:00
6b85350845
parser/gotest: Refactor tests to test each line type specifically
...
This makes the tests more focused on each distinct type of line that is
recognized. Maintaining and extending these tests will also be less work
going forward.
2022-03-20 22:35:50 +00:00
e2a7c1a394
parser/gotest: Add TODO to remove the build_output type
2022-03-20 22:35:50 +00:00
c3acdf13c2
parser/gotest: Remove unnecessary string concatenation in regexSummary
2022-03-20 22:35:50 +00:00
1069a04b9f
parser/gotest: Fix failing build error test
2022-03-20 22:35:50 +00:00
ffc33941fa
gtr, parser/gotest: Add support for build errors
2022-03-20 22:35:50 +00:00
3f9d5b62db
gtr, parser/gotest: Move output formatting out of parser
2022-03-20 22:35:50 +00:00
08a21eb096
parser/gotest: Fix output trimming
2022-03-20 22:35:50 +00:00
79753fd332
parser/gotest: Trim tab prefix from output
2022-03-20 22:35:50 +00:00
88177b5692
parser/gotest: Add test 131
2022-03-20 22:35:50 +00:00
4f6df9492b
gtr, parser/gotest: Add test 130
2022-03-20 22:35:50 +00:00
1c800998dd
parser/gotest: Add test 30
2022-03-20 22:35:50 +00:00
0219808022
parser/gotest: Add test 32
2022-03-20 22:35:50 +00:00
29fc9e3974
parser/gotest: Add test 31
2022-03-20 22:35:50 +00:00
84801b696c
parser/gotest: Add tests 28 and 29
2022-03-20 22:35:50 +00:00
1a0c32347c
gtr,parser/gotest: Add test 27
2022-03-20 22:35:50 +00:00
be29a47155
parser/gotest: Add test 26
2022-03-20 22:35:50 +00:00
8ef9ea2965
parser/gotest: Add test 25
2022-03-20 22:35:50 +00:00
3676ed3cca
parser/gotest: Add test 24
2022-03-20 22:35:50 +00:00
e33490229b
parser/gotest: Add test 23
2022-03-20 22:35:50 +00:00
c03c92d418
gtr,parser/gotest: Improve benchmark output matching
2022-03-20 22:35:50 +00:00
bac074db96
parser/gotest: Initial support for parsing benchmarks
2022-03-20 22:35:50 +00:00
ff2fc90eeb
parser/gotest,gtr: Move Event type to package gtr
2022-03-20 22:35:50 +00:00
c6349bc2f5
parser/gotest: Make parser/gotest parser stateless
2022-03-11 21:53:02 +00:00
1cf71a341d
parser/gotest: Remove debug printf line
2022-03-07 00:09:34 +00:00
a7ad52d825
parser/gotest: Parse cached tests
2022-03-07 00:09:34 +00:00
76069cb328
parser/gotest: Parse additional parallel output
2022-03-07 00:09:34 +00:00
236bda9d6d
parser/gotest: Check for prefix that's not part of end-test
2022-03-07 00:09:34 +00:00
6026e8f15e
parser/gotest: Parse package coverage
2022-03-07 00:09:34 +00:00
34ffb9d16d
parser/gotest: Remove indent for output, add test for race
2022-03-07 00:09:34 +00:00
42bf91bd4d
parser/gotest: Refactor to subtests & add more tests
2022-03-07 00:09:34 +00:00
48c4de6257
parser/gotest: Parse build failures
2022-03-07 00:09:34 +00:00
2e3761de80
parser/gotest: Properly handle subtest prefixes
2022-03-07 00:09:34 +00:00
8ec797a84c
parser/gotest: Fix indent detection of test output
2022-03-07 00:09:34 +00:00
73545440ce
parser/gotest: Add test for go1.5 test output
2022-03-07 00:09:34 +00:00
a4e60c8339
parser/gotest: Parse coverage from summary lines
2022-03-07 00:09:34 +00:00
a58f8f1a19
parser/gotest: Add support for parsing go test coverage
2022-03-07 00:09:34 +00:00
c5559de1a8
parser/gotest: Add tests for compiled test output and parallel test output
2022-03-07 00:09:34 +00:00
a6b3b6f974
parser/gotest: Add tests for go1.4 output and multiple packages
2022-03-07 00:09:34 +00:00
caf696a15d
parser/gotest: Add test for skipped tests
2022-03-07 00:09:34 +00:00
0512acf25e
parser/gotest: Handle test output logging
2022-03-07 00:09:34 +00:00
292d0c814b
parser/gotest: Initial version of package parser/gotest
2022-03-07 00:09:30 +00:00