From 49b47a1b08e7ca776613c43f0b9f8c061f67afef Mon Sep 17 00:00:00 2001 From: michelle-clayton-work Date: Thu, 19 Mar 2026 14:29:07 -0700 Subject: [PATCH 1/4] test commit --- ...ilures-to-verify-JUnit-package-name-.patch | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 patches/0015-Add-fake-test-failures-to-verify-JUnit-package-name-.patch diff --git a/patches/0015-Add-fake-test-failures-to-verify-JUnit-package-name-.patch b/patches/0015-Add-fake-test-failures-to-verify-JUnit-package-name-.patch new file mode 100644 index 0000000000..3ebe284872 --- /dev/null +++ b/patches/0015-Add-fake-test-failures-to-verify-JUnit-package-name-.patch @@ -0,0 +1,56 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: bot-for-go[bot] <199222863+bot-for-go[bot]@users.noreply.github.com> +Date: Thu, 19 Mar 2026 13:53:33 -0700 +Subject: [PATCH] Add fake test failures to verify JUnit package name display + +--- + src/crypto/sha256/sha256_test.go | 4 ++++ + src/strconv/quote_test.go | 4 ++++ + src/strings/clone_test.go | 4 ++++ + 3 files changed, 12 insertions(+) + +diff --git a/src/crypto/sha256/sha256_test.go b/src/crypto/sha256/sha256_test.go +index 7b3b37c3b0c10d..d26747f01be262 100644 +--- a/src/crypto/sha256/sha256_test.go ++++ b/src/crypto/sha256/sha256_test.go +@@ -93,6 +93,10 @@ var golden224 = []sha256Test{ + {"86ed2eaa9c75ba98396e5c9fb2f679ecf0ea2ed1e0ee9ceecb4a9332", "How can you write a big system without C++? -Paul Glick", "sha\x02\xc1\x05\x9e\xd86|\xd5\a0p\xdd\x17\xf7\x0eY9\xff\xc0\v1hX\x15\x11d\xf9\x8f\xa7\xbe\xfaO\xa4How can you write a big syst\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c"}, + } + ++func TestFakeFailure(t *testing.T) { ++ t.Fatal("fake failure to test JUnit package name display") ++} ++ + func TestGolden(t *testing.T) { + cryptotest.TestAllImplementations(t, "sha256", testGolden) + } +diff --git a/src/strconv/quote_test.go b/src/strconv/quote_test.go +index fc000de7b17f1d..d9c5eab1ecdca2 100644 +--- a/src/strconv/quote_test.go ++++ b/src/strconv/quote_test.go +@@ -11,6 +11,10 @@ import ( + "unicode" + ) + ++func TestFakeFailure(t *testing.T) { ++ t.Fatal("fake failure to test JUnit package name display") ++} ++ + // Verify that our IsPrint agrees with unicode.IsPrint. + func TestIsPrint(t *testing.T) { + n := 0 +diff --git a/src/strings/clone_test.go b/src/strings/clone_test.go +index 64f2760ee378db..9fe75113aba8e2 100644 +--- a/src/strings/clone_test.go ++++ b/src/strings/clone_test.go +@@ -12,6 +12,10 @@ import ( + + var emptyString string + ++func TestFakeFailure(t *testing.T) { ++ t.Fatal("fake failure to test JUnit package name display") ++} ++ + func TestClone(t *testing.T) { + var cloneTests = []string{ + "", From 5f8911610eeb7da2593d24c224c33b7672ed3a0d Mon Sep 17 00:00:00 2001 From: michelle-clayton-work Date: Thu, 19 Mar 2026 15:30:27 -0700 Subject: [PATCH 2/4] Bump go-infra to test JUnit package name display --- eng/_util/go.mod | 2 +- eng/_util/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/_util/go.mod b/eng/_util/go.mod index 2535377925..4c4f0e7503 100644 --- a/eng/_util/go.mod +++ b/eng/_util/go.mod @@ -8,7 +8,7 @@ go 1.25.0 require ( github.com/golang-jwt/jwt/v5 v5.3.1 - github.com/microsoft/go-infra v0.0.9 + github.com/microsoft/go-infra v0.0.10-0.20260319202608-bd0e7f1f3573 github.com/microsoft/go-infra/goinstallscript v1.2.0 golang.org/x/net v0.52.0 ) diff --git a/eng/_util/go.sum b/eng/_util/go.sum index 03408b10ff..c946cccc8b 100644 --- a/eng/_util/go.sum +++ b/eng/_util/go.sum @@ -31,8 +31,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b5 h1:YH424zrwLTlyHSH/GzLMJeu5zhYVZSx5RQxGKm1h96s= github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b5/go.mod h1:PoGiBqKSQK1vIfQ+yVaFcGjDySHvym6FM1cNYnwzbrY= -github.com/microsoft/go-infra v0.0.9 h1:emnuI8I9HGQESkwuTD2YAQFokgPKUzOjRlqpLp4+AfQ= -github.com/microsoft/go-infra v0.0.9/go.mod h1:HjCdUUo5fRDh0jFvKS2Ownh6RKKsWVJkXXuWS7FGKsY= +github.com/microsoft/go-infra v0.0.10-0.20260319202608-bd0e7f1f3573 h1:QRQXirWwYwuAW93cdtAhkJhHQ8ycwM/u9D1S9O/y1Hc= +github.com/microsoft/go-infra v0.0.10-0.20260319202608-bd0e7f1f3573/go.mod h1:HjCdUUo5fRDh0jFvKS2Ownh6RKKsWVJkXXuWS7FGKsY= github.com/microsoft/go-infra/goinstallscript v1.2.0 h1:ArYnZHsmv0jnpeDZdFACBUxSmhmYl+Vof8sfk19aYZI= github.com/microsoft/go-infra/goinstallscript v1.2.0/go.mod h1:SFsdKAEHdmGsGoh8FkksVaxoQ3rnnJ/TBqN09Ml/0Cw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= From 38a5940f84471cd1c35e08f2e061e92f7fbc4ac4 Mon Sep 17 00:00:00 2001 From: michelle-clayton-work Date: Fri, 20 Mar 2026 10:45:10 -0700 Subject: [PATCH 3/4] Enable package name prefix in JUnit test output --- eng/_util/buildutil/testjson.go | 4 +++- eng/_util/go.mod | 2 +- eng/_util/go.sum | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/eng/_util/buildutil/testjson.go b/eng/_util/buildutil/testjson.go index 6a60709b2f..895e8cd676 100644 --- a/eng/_util/buildutil/testjson.go +++ b/eng/_util/buildutil/testjson.go @@ -62,7 +62,9 @@ func (f *TestJSONFlags) RunTestCmd(cmdline []string) (err error) { defer func() { err = errors.Join(err, jf.Close()) }() - c := json2junit.NewConverter(jf) + c := json2junit.NewConverterOptions(jf, &json2junit.Options{ + IncludePackageInTestName: true, + }) defer func() { err = errors.Join(err, c.Close()) }() diff --git a/eng/_util/go.mod b/eng/_util/go.mod index 4c4f0e7503..f320319a86 100644 --- a/eng/_util/go.mod +++ b/eng/_util/go.mod @@ -8,7 +8,7 @@ go 1.25.0 require ( github.com/golang-jwt/jwt/v5 v5.3.1 - github.com/microsoft/go-infra v0.0.10-0.20260319202608-bd0e7f1f3573 + github.com/microsoft/go-infra v0.0.10-0.20260320173547-2a8066f05166 github.com/microsoft/go-infra/goinstallscript v1.2.0 golang.org/x/net v0.52.0 ) diff --git a/eng/_util/go.sum b/eng/_util/go.sum index c946cccc8b..c411a29e6e 100644 --- a/eng/_util/go.sum +++ b/eng/_util/go.sum @@ -31,8 +31,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b5 h1:YH424zrwLTlyHSH/GzLMJeu5zhYVZSx5RQxGKm1h96s= github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b5/go.mod h1:PoGiBqKSQK1vIfQ+yVaFcGjDySHvym6FM1cNYnwzbrY= -github.com/microsoft/go-infra v0.0.10-0.20260319202608-bd0e7f1f3573 h1:QRQXirWwYwuAW93cdtAhkJhHQ8ycwM/u9D1S9O/y1Hc= -github.com/microsoft/go-infra v0.0.10-0.20260319202608-bd0e7f1f3573/go.mod h1:HjCdUUo5fRDh0jFvKS2Ownh6RKKsWVJkXXuWS7FGKsY= +github.com/microsoft/go-infra v0.0.10-0.20260320173547-2a8066f05166 h1:y74Bqqzd8C2pqhGX53Lox/aDHCldCIF6HsV0E8BWplE= +github.com/microsoft/go-infra v0.0.10-0.20260320173547-2a8066f05166/go.mod h1:HjCdUUo5fRDh0jFvKS2Ownh6RKKsWVJkXXuWS7FGKsY= github.com/microsoft/go-infra/goinstallscript v1.2.0 h1:ArYnZHsmv0jnpeDZdFACBUxSmhmYl+Vof8sfk19aYZI= github.com/microsoft/go-infra/goinstallscript v1.2.0/go.mod h1:SFsdKAEHdmGsGoh8FkksVaxoQ3rnnJ/TBqN09Ml/0Cw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= From 34bc1e21507e9efa9c04e23f585cc6ad5cae3a26 Mon Sep 17 00:00:00 2001 From: michelle-clayton-work Date: Fri, 20 Mar 2026 11:35:51 -0700 Subject: [PATCH 4/4] Opt out of package name prefix in JUnit test output --- eng/_util/buildutil/testjson.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eng/_util/buildutil/testjson.go b/eng/_util/buildutil/testjson.go index 895e8cd676..6a60709b2f 100644 --- a/eng/_util/buildutil/testjson.go +++ b/eng/_util/buildutil/testjson.go @@ -62,9 +62,7 @@ func (f *TestJSONFlags) RunTestCmd(cmdline []string) (err error) { defer func() { err = errors.Join(err, jf.Close()) }() - c := json2junit.NewConverterOptions(jf, &json2junit.Options{ - IncludePackageInTestName: true, - }) + c := json2junit.NewConverter(jf) defer func() { err = errors.Join(err, c.Close()) }()