Skip to content

Commit e6d2544

Browse files
ALTreemvdan
authored andcommitted
test/codegen: mention -all_codegen in the README
For performance reasons (avoiding costly cross-compilations) CL 177577 changed the codegen test harness to only run the tests for the machine's GOARCH by default. This change updates the codegen README accordingly, explaining what all.bash does run by default and how to perform the tests for all architectures. Fixes #33924 Change-Id: I43328d878c3e449ebfda46f7e69963a44a511d40 Reviewed-on: https://go-review.googlesource.com/c/go/+/192619 Reviewed-by: Daniel Martí <[email protected]>
1 parent c51909e commit e6d2544

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

test/codegen/README

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,20 @@ compiler.
99
- Introduction
1010

1111
The test harness compiles Go code inside files in this directory and
12-
then matches the generated assembly (the output of `go tool compile -S`)
13-
against a set of regexps specified in comments that follow a special
14-
syntax (described below). The test driver is implemented as a step of
15-
the top-level test/run.go suite, called "asmcheck".
12+
matches the generated assembly (the output of `go tool compile -S`)
13+
against a set of regexps to be specified in comments that follow a
14+
special syntax (described below). The test driver is implemented as a
15+
step of the top-level test/run.go suite, called "asmcheck".
1616

17-
The codegen tests run during all.bash, but can also be run in
18-
isolation by using
17+
The codegen harness is part of the all.bash test suite, but for
18+
performance reasons only the codegen tests for the host machine's
19+
GOARCH are enabled by default. To perform comprehensive tests for all
20+
the supported architectures, one can run the following command
1921

20-
$ ../bin/go run run.go -v codegen
22+
$ ../bin/go run run.go -all_codegen -v codegen
2123

22-
in the top-level test directory.
24+
in the top-level test directory. This is recommended after any change
25+
that affect the compiler's code.
2326

2427
The test harness compiles the tests with the same go toolchain that is
2528
used to run run.go. After writing tests for a newly added codegen
@@ -94,6 +97,7 @@ For example:
9497
verifies that NO memmove call is present in the assembly generated for
9598
the copy() line.
9699

100+
97101
- Architecture specifiers
98102

99103
There are three different ways to specify on which architecture a test

0 commit comments

Comments
 (0)