19 Commits

Author SHA1 Message Date
Joël Stemmer
c796dcf8d1 junit: Remove unused indent parameter from formatOutput function 2022-08-23 23:04:15 +01:00
greg-dennis
15d215e49d Report stores a slice of Property structs rather than a map, to mimic JUnit properties, which have a deterministic ordering and allow multipler properties with the same name. 2022-08-23 10:41:42 -04:00
Joël Stemmer
ddf6b16828 Replace += 1 with ++ 2022-08-13 20:48:31 +01:00
Joël Stemmer
fbfb33add1 junit: Use consistent receiver name 2022-08-13 20:47:42 +01:00
Joël Stemmer
3d712f2417 junit: Don't include File attribute when it's empty 2022-07-07 00:19:59 +01:00
Aleksandr Lyubenkov
03010d4a32 junit: Add File attribute to testsuite
Closes #113
2022-07-07 00:18:30 +01:00
Joël Stemmer
63e0c8be15 junit: Improve test coverage of junit.CreateFromReport 2022-06-26 14:55:54 +01:00
Joël Stemmer
dc591b8731 junit: Remove benchmark specific code from package junit
The junit package shouldn't need to know anything about benchmarks and
gtr.Benchmark will be removed in a future commit. Instead, it will be
the responsibility of the gotest parser to represent benchmarks using
gtr.Test.
2022-06-15 23:46:40 +01:00
Joël Stemmer
d05abd4130 junit: Include output in JUnit report for skipped and failed benchmarks 2022-06-13 00:34:20 +01:00
Joël Stemmer
f1ad02b733 junit: Use the standard duration formatting for benchmark durations
Benchmark durations were originally formatted with higher precision
because they contained just the NsPerOp field. Now that we're
approximating the total duration they are more accurate and don't need
as many decimals.
2022-06-12 23:02:01 +01:00
Joël Stemmer
9a1666d75c gtr,junit: Move Benchmark duration calculation to gtr package 2022-06-12 22:54:12 +01:00
Joël Stemmer
c87388ae59 parser/gotest,junit: Move benchmark grouping to parser/gotest package
Having multiple benchmarks for a single name is something specific to
the gotest output, so grouping benchmarks by name is not something that
belongs in the junit package.
2022-06-08 23:01:01 +01:00
Joël Stemmer
f33a746c85 junit: Simplify the formatOutput function
This function was used in the past to perform some operations on the
individual output lines before joining them together. However, now it's
only used to combine the collection of lines into a single output
string.
2022-06-08 23:01:01 +01:00
Joël Stemmer
0655053883 junit: Move testcase creation from tests and benchmarks to functions 2022-05-21 23:06:44 +01:00
Joël Stemmer
9bc291d7ca junit: Make Testsuites.ID a required field 2022-05-21 14:28:22 +01:00
Joël Stemmer
d2592490b6 junit: Include output in JUnit report for successful tests and benchmarks 2022-05-14 23:36:18 +01:00
Joël Stemmer
df7394c77c Fix cmp.Diff argument order in tests 2022-05-13 21:45:38 +01:00
Joël Stemmer
7c195be87f Do not trim output whitespace prefix
Whitespace prefix of output lines was carried over from the old v1
version, but in some cases it removes too much whitespace. Ideally it
would detect the common prefix of all output lines for a given text and
only trim that. Until that's fixed, let's just stop removing the
whitespace.

Fixes #131
2022-05-13 21:01:49 +01:00
Joël Stemmer
d84b066208 Move packages out of pkg/ 2022-04-20 19:39:05 +01:00