<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/cmd/internal/script/scripttest, branch main</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2026-03-31T18:40:13Z</updated>
<entry>
<title>cmd/go/internal/doc: use internal go command logic to load packages</title>
<updated>2026-03-31T18:40:13Z</updated>
<author>
<name>matloob</name>
<email>matloob@golang.org</email>
</author>
<published>2025-12-29T18:16:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2000e27ea6a644ea3623db201d8ba2818e8f5838'/>
<id>urn:sha1:2000e27ea6a644ea3623db201d8ba2818e8f5838</id>
<content type='text'>
We've been using go/build to load packages, and that doesn't
always do the right thing, because it doesn't have the same
context and settings that the go command uses to load packages.
Use the go command's loader to load packages.

This CL doesn't remove the logic for searching for matching
packages in dirs.go. A next step would be to remove that so
all the matching is also done with the go command's logic.

Fixes #75976

Change-Id: I3c76d9a54dc88648bb7c76a17afad8cb6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/733200
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Sean Liao &lt;sean@liao.dev&gt;
Reviewed-by: Junyang Shao &lt;shaojunyang@google.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@google.com&gt;
</content>
</entry>
<entry>
<title>cmd/internal/test2json: generate and validate test artifacts</title>
<updated>2026-03-09T18:02:12Z</updated>
<author>
<name>Ethan Reesor</name>
<email>ethan.reesor@gmail.com</email>
</author>
<published>2024-11-16T15:54:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f5e3332108dd73166a1cbe35bfebe8bf99386019'/>
<id>urn:sha1:f5e3332108dd73166a1cbe35bfebe8bf99386019</id>
<content type='text'>
Adds a mechanism for generating test2json test artifacts from and validating them against a real test. If a .test file has a corresponding .src file, TestGolden will now treat the .src file as a script test, executing it and verifying that the output matches the contents of the .test file. Running TestGolden with the -update flag will also regenerate .test files if they have a corresponding .src file.

Capturing the output of the script test in this way required making minor changes to cmd/internal/script/scripttest.

This was motivated by CL 601535 (golang/go#62728). Specifically, testing that CL required adding src/cmd/internal/test2json/testdata/frameescape.test which has a multitude of non-printing characters and thus must be generated by executing `go test`. Using a script test to generate the test file is more reliable than doing it by hand.

Change-Id: I60456700e37e21a42d0514be2ce86dc6df2bccb0
Reviewed-on: https://go-review.googlesource.com/c/go/+/628615
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>cmd/internal/fuzztest: move fuzz tests out of cmd/go test suite</title>
<updated>2025-12-04T23:05:53Z</updated>
<author>
<name>Michael Matloob</name>
<email>matloob@golang.org</email>
</author>
<published>2025-12-04T19:21:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a753a9ed54c7ead93e56e5b183b743877b7695a6'/>
<id>urn:sha1:a753a9ed54c7ead93e56e5b183b743877b7695a6</id>
<content type='text'>
They are very slow: taking them out of the cmd/go test suite makes the
go command tests go from about 80 seconds to run on my system, to about
50 seconds to run.

Change-Id: I19b5c252bd2b6e6d64821cada961ddaa6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/726960
Auto-Submit: Michael Matloob &lt;matloob@google.com&gt;
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>all: replace calls to errors.As with errors.AsType</title>
<updated>2025-10-13T17:12:48Z</updated>
<author>
<name>Julien Cretel</name>
<email>jub0bsinthecloud@gmail.com</email>
</author>
<published>2025-10-01T20:08:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6bcd97d9f4386528aa85eb3cc27da0ed902de870'/>
<id>urn:sha1:6bcd97d9f4386528aa85eb3cc27da0ed902de870</id>
<content type='text'>
This change replaces most occurrences (in code as well as in comments) of
errors.As with errors.AsType. It leaves the errors package and vendored
code untouched.

Change-Id: I3bde73f318a0b408bdb8f5a251494af15a13118a
GitHub-Last-Rev: 8aaaa36a5a12d2a6a90c6d51680464e1a3115139
GitHub-Pull-Request: golang/go#75698
Reviewed-on: https://go-review.googlesource.com/c/go/+/708495
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>all: replace strings.Split with strings.SplitSeq</title>
<updated>2025-09-16T00:34:45Z</updated>
<author>
<name>1911860538</name>
<email>alxps1911@gmail.com</email>
</author>
<published>2025-09-15T14:39:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e3ed0fbe6a4c7c5e91a4a82c1bcbc96b9ac37016'/>
<id>urn:sha1:e3ed0fbe6a4c7c5e91a4a82c1bcbc96b9ac37016</id>
<content type='text'>
In Go 1.25+, strings.SplitSeq offers better
performance. Here are the benchmark results comparing
strings.Split and strings.SplitSeq in a for-loop, with the
benchmark code located in src/strings/iter_test.go:

goos: darwin
goarch: amd64
pkg: cmd/go/internal/auth
cpu: Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
                         │   old.txt   │               new.txt                │
                         │   sec/op    │    sec/op     vs base                │
ParseGitAuth/standard-8    281.4n ± 1%   218.0n ± 11%  -22.54% (p=0.000 n=10)
ParseGitAuth/with_url-8    549.1n ± 1%   480.5n ± 13%  -12.48% (p=0.002 n=10)
ParseGitAuth/minimal-8     235.4n ± 1%   197.3n ±  7%  -16.20% (p=0.000 n=10)
ParseGitAuth/complex-8     797.6n ± 2%   805.2n ±  4%        ~ (p=0.481 n=10)
ParseGitAuth/empty-8       87.48n ± 3%   63.25n ±  6%  -27.71% (p=0.000 n=10)
ParseGitAuth/malformed-8   228.8n ± 1%   171.2n ±  3%  -25.17% (p=0.000 n=10)
geomean                    288.9n        237.7n        -17.72%

                         │   old.txt   │              new.txt               │
                         │    B/op     │    B/op     vs base                │
ParseGitAuth/standard-8    192.00 ± 0%   96.00 ± 0%  -50.00% (p=0.000 n=10)
ParseGitAuth/with_url-8     400.0 ± 0%   288.0 ± 0%  -28.00% (p=0.000 n=10)
ParseGitAuth/minimal-8     144.00 ± 0%   80.00 ± 0%  -44.44% (p=0.000 n=10)
ParseGitAuth/complex-8      528.0 ± 0%   400.0 ± 0%  -24.24% (p=0.000 n=10)
ParseGitAuth/empty-8        32.00 ± 0%   16.00 ± 0%  -50.00% (p=0.000 n=10)
ParseGitAuth/malformed-8   176.00 ± 0%   80.00 ± 0%  -54.55% (p=0.000 n=10)
geomean                     179.0        102.1       -42.96%

                         │  old.txt   │              new.txt               │
                         │ allocs/op  │ allocs/op   vs base                │
ParseGitAuth/standard-8    3.000 ± 0%   2.000 ± 0%  -33.33% (p=0.000 n=10)
ParseGitAuth/with_url-8    4.000 ± 0%   3.000 ± 0%  -25.00% (p=0.000 n=10)
ParseGitAuth/minimal-8     3.000 ± 0%   2.000 ± 0%  -33.33% (p=0.000 n=10)
ParseGitAuth/complex-8     4.000 ± 0%   3.000 ± 0%  -25.00% (p=0.000 n=10)
ParseGitAuth/empty-8       2.000 ± 0%   1.000 ± 0%  -50.00% (p=0.000 n=10)
ParseGitAuth/malformed-8   3.000 ± 0%   2.000 ± 0%  -33.33% (p=0.000 n=10)
geomean                    3.086        2.040       -33.91%

Updates #69315.

Change-Id: Id0219edea45d9658d527b863162ebe917e7821d9
GitHub-Last-Rev: 392b315e122f2c9ef8703ca2dbce8f82ec198556
GitHub-Pull-Request: golang/go#75259
Reviewed-on: https://go-review.googlesource.com/c/go/+/701015
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Reviewed-by: Keith Randall &lt;khr@google.com&gt;
Auto-Submit: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
</content>
</entry>
<entry>
<title>cmd/internal/script: fix copying directory when symlink fails</title>
<updated>2025-05-14T17:10:33Z</updated>
<author>
<name>Ian Alexander</name>
<email>jitsu@google.com</email>
</author>
<published>2025-05-13T16:41:36Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=9856afa77042d901288845f31c79885ba68da464'/>
<id>urn:sha1:9856afa77042d901288845f31c79885ba68da464</id>
<content type='text'>
The change fixes `linkOrCopy` to work on systems wihtout symlinks,
when copying directories.  This was originally noticed on Windows
systems when the user did not have admin privs.

Fixes #73692
Change-Id: I8ca66d65e99433ad38e70314abfabafd43794b79
Reviewed-on: https://go-review.googlesource.com/c/go/+/672275
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
Reviewed-by: Michael Matloob &lt;matloob@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>cmd/internal/script/scripttest: use GOHOSTARCH to find tool directory</title>
<updated>2025-03-12T01:16:13Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2025-03-11T22:00:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=43648931492e45c78ba3e21e7191944a0bb7c10b'/>
<id>urn:sha1:43648931492e45c78ba3e21e7191944a0bb7c10b</id>
<content type='text'>
Fixes #72800

Change-Id: Idde7eae13d1c0098e5314935cf8ca823cbc7a7cc
Reviewed-on: https://go-review.googlesource.com/c/go/+/656855
Auto-Submit: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: Keith Randall &lt;khr@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>all: fix some function names and typos in comment</title>
<updated>2024-11-21T22:16:20Z</updated>
<author>
<name>cuishuang</name>
<email>imcusg@gmail.com</email>
</author>
<published>2024-11-20T13:56:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a925402b62c06d1cfe2b345cba0b11fa06b8401d'/>
<id>urn:sha1:a925402b62c06d1cfe2b345cba0b11fa06b8401d</id>
<content type='text'>
Change-Id: I07e7c8eaa5bd4bac0d576b2f2f4cd3f81b0b77a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/630055
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Commit-Queue: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>cmd: add README generation for compiler + linker script tests</title>
<updated>2024-07-31T13:21:20Z</updated>
<author>
<name>Than McIntosh</name>
<email>thanm@google.com</email>
</author>
<published>2024-07-30T14:20:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8246171baee397165318638390c37e07b5b3ebc7'/>
<id>urn:sha1:8246171baee397165318638390c37e07b5b3ebc7</id>
<content type='text'>
Add in automatic README generation and README consistency checking for
the cmd/compile and cmd/link script tests. This code is adapted from
the similar facility in cmd/go (e.g. scriptreadme_test.go); the README
helps folks writing new tests understand the mechanics.

Updates #68606.

Change-Id: I8ff7ff8e814abd4385bd670440511b2c60a4cef6
Reviewed-on: https://go-review.googlesource.com/c/go/+/601756
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>cmd/internal/script: new hook for adding in toolchain script conditions</title>
<updated>2024-07-31T13:21:14Z</updated>
<author>
<name>Than McIntosh</name>
<email>thanm@google.com</email>
</author>
<published>2024-07-29T17:40:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=b60f88d81022e4172e44aef2f0bdade87ed6916d'/>
<id>urn:sha1:b60f88d81022e4172e44aef2f0bdade87ed6916d</id>
<content type='text'>
Introduce a new function AddToolChainScriptConditions that augments a
default "script.Cond" set with a collection of useful conditions,
including godebug/goexperiment, cgo, race support, buildmode, asan,
msan, and so on. Having these conditions available makes it easier to
write script tests that deal with specific build-flavor corner cases.
The functions backing the new conditions are helper functions migrated
over from the Go command's script test setup.

Updates #68606.

Change-Id: I14def1115b54dc47529c983abcd2c5ea9326b9de
Reviewed-on: https://go-review.googlesource.com/c/go/+/601715
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
</feed>
