From 4d0ed8b68186bbeabfdc91f3fbe72626be5f69c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Stemmer?= Date: Thu, 11 Aug 2022 23:59:19 +0100 Subject: [PATCH] Add testdata for `go test -json -race` tests. Refs #134 --- testdata/113-race.gojson.txt | 14 ++++++++++++++ testdata/113-report.xml | 15 +++++++++++++++ testdata/src/race-json/pkg1/pkg1_test.go | 6 ++++++ testdata/src/race-json/pkg2/pkg2_test.go | 6 ++++++ 4 files changed, 41 insertions(+) create mode 100644 testdata/113-race.gojson.txt create mode 100644 testdata/113-report.xml create mode 100644 testdata/src/race-json/pkg1/pkg1_test.go create mode 100644 testdata/src/race-json/pkg2/pkg2_test.go diff --git a/testdata/113-race.gojson.txt b/testdata/113-race.gojson.txt new file mode 100644 index 00000000..a8b83595 --- /dev/null +++ b/testdata/113-race.gojson.txt @@ -0,0 +1,14 @@ +{"Time":"2022-07-17T22:24:20.065393432+01:00","Action":"run","Package":"package/race-json/pkg1","Test":"TestPkg1"} +{"Time":"2022-07-17T22:24:20.065595209+01:00","Action":"output","Package":"package/race-json/pkg1","Test":"TestPkg1","Output":"=== RUN TestPkg1\n"} +{"Time":"2022-07-17T22:24:20.065621488+01:00","Action":"output","Package":"package/race-json/pkg1","Test":"TestPkg1","Output":"--- PASS: TestPkg1 (0.00s)\n"} +{"Time":"2022-07-17T22:24:20.065633674+01:00","Action":"pass","Package":"package/race-json/pkg1","Test":"TestPkg1","Elapsed":0} +{"Time":"2022-07-17T22:24:20.065647242+01:00","Action":"output","Package":"package/race-json/pkg1","Output":"PASS\n"} +{"Time":"2022-07-17T22:24:20.065407525+01:00","Action":"run","Package":"package/race-json/pkg2","Test":"TestPkg2"} +{"Time":"2022-07-17T22:24:20.06568802+01:00","Action":"output","Package":"package/race-json/pkg2","Test":"TestPkg2","Output":"=== RUN TestPkg2\n"} +{"Time":"2022-07-17T22:24:20.065713342+01:00","Action":"output","Package":"package/race-json/pkg2","Test":"TestPkg2","Output":"--- PASS: TestPkg2 (0.00s)\n"} +{"Time":"2022-07-17T22:24:20.065725102+01:00","Action":"pass","Package":"package/race-json/pkg2","Test":"TestPkg2","Elapsed":0} +{"Time":"2022-07-17T22:24:20.065736721+01:00","Action":"output","Package":"package/race-json/pkg2","Output":"PASS\n"} +{"Time":"2022-07-17T22:24:20.06574776+01:00","Action":"output","Package":"package/race-json/pkg2","Output":"ok \tpackage/race-json/pkg2\t(cached)\n"} +{"Time":"2022-07-17T22:24:20.065763529+01:00","Action":"pass","Package":"package/race-json/pkg2","Elapsed":0} +{"Time":"2022-07-17T22:24:20.065657773+01:00","Action":"output","Package":"package/race-json/pkg1","Output":"ok \tpackage/race-json/pkg1\t(cached)\n"} +{"Time":"2022-07-17T22:24:20.065831715+01:00","Action":"pass","Package":"package/race-json/pkg1","Elapsed":0} diff --git a/testdata/113-report.xml b/testdata/113-report.xml new file mode 100644 index 00000000..d9738261 --- /dev/null +++ b/testdata/113-report.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/testdata/src/race-json/pkg1/pkg1_test.go b/testdata/src/race-json/pkg1/pkg1_test.go new file mode 100644 index 00000000..53f4fe9b --- /dev/null +++ b/testdata/src/race-json/pkg1/pkg1_test.go @@ -0,0 +1,6 @@ +package pkg1 + +import "testing" + +func TestPkg1(t *testing.T) { +} diff --git a/testdata/src/race-json/pkg2/pkg2_test.go b/testdata/src/race-json/pkg2/pkg2_test.go new file mode 100644 index 00000000..9a399f6a --- /dev/null +++ b/testdata/src/race-json/pkg2/pkg2_test.go @@ -0,0 +1,6 @@ +package pkg2 + +import "testing" + +func TestPkg2(t *testing.T) { +}