unix: factor out mkmerge into a proper package

Factor mkmerge.go and mkmerge_test.go into package internal/mkmerge.

Due to ignore constraints, mkmerge_test.go wasn't run by the Go
builders and failing tests were unnoticed.

Factoring mkmerge into its own package and removing ignore constraints
makes the tests run automatically by the Go builders.

Fixes golang/go#49484

Change-Id: I56a0b7220e40d1d7e5193490cb547cad4202f9ac
Reviewed-on: https://go-review.googlesource.com/c/sys/+/363334
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Johan Jansson
2021-11-12 16:43:55 +00:00
committed by Tobias Klauser
parent 7c45f0c2c7
commit 7580c6e521
7 changed files with 14 additions and 23 deletions
+1 -1
View File
@@ -572,7 +572,7 @@ func mergeFiles() error {
// Merge each of the four type of files
for _, ztyp := range []string{"zerrors", "zsyscall", "zsysnum", "ztypes"} {
cmd := makeCommand("go", "run", "mkmerge.go", "-out", fmt.Sprintf("%s_%s.go", ztyp, GOOS), fmt.Sprintf("%s_%s_*.go", ztyp, GOOS))
cmd := makeCommand("go", "run", "./internal/mkmerge", "-out", fmt.Sprintf("%s_%s.go", ztyp, GOOS), fmt.Sprintf("%s_%s_*.go", ztyp, GOOS))
err := cmd.Run()
if err != nil {
return fmt.Errorf("could not merge %s files: %w", ztyp, err)