treewide: compress testdata

This significantly improves handling by reducing file size. This is also part of an effort of getting this to build on nix itself.
This commit is contained in:
Ophestra 2025-07-20 04:12:26 +09:00
parent 55933ccfb3
commit 66a4079114
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q
34 changed files with 64 additions and 3276021 deletions

View File

@ -5,20 +5,23 @@ import _ "embed"
// github:getchoo/borealis#atlas // github:getchoo/borealis#atlas
var ( var (
//go:embed testdata/getchoo_atlas getchooAtlasOut = string(sampleMustGunzip(getchooAtlasOutGzip))
getchooAtlasOut string //go:embed testdata/getchoo_atlas.gz
getchooAtlasOutGzip []byte
getchooAtlasInstantiated = sampleSplitPaths(getchooAtlasInstantiatedRaw) getchooAtlasInstantiated = sampleSplitPaths(sampleMustGunzip(getchooAtlasInstantiatedGzip))
//go:embed testdata/instantiated/getchoo_atlas //go:embed testdata/instantiated/getchoo_atlas.gz
getchooAtlasInstantiatedRaw string getchooAtlasInstantiatedGzip []byte
//go:embed testdata/derivation/show_getchoo_atlas.json getchooAtlasShow = sampleMustGunzip(getchooAtlasShowGzip)
getchooAtlasShow []byte //go:embed testdata/derivation/show_getchoo_atlas.json.gz
getchooAtlasShowGzip []byte
getchooAtlasCollective = sampleSplitPaths(getchooAtlasCollectiveRaw) getchooAtlasCollective = sampleSplitPaths(sampleMustGunzip(getchooAtlasCollectiveGzip))
//go:embed testdata/derivation/collect_getchoo_atlas //go:embed testdata/derivation/collect_getchoo_atlas.gz
getchooAtlasCollectiveRaw string getchooAtlasCollectiveGzip []byte
//go:embed testdata/format/stdin_getchoo_atlas getchooAtlasStdin = string(sampleMustGunzip(getchooAtlasStdinGzip))
getchooAtlasStdin string //go:embed testdata/format/stdin_getchoo_atlas.gz
getchooAtlasStdinGzip []byte
) )

View File

@ -5,20 +5,23 @@ import _ "embed"
// github:getchoo/borealis#glados // github:getchoo/borealis#glados
var ( var (
//go:embed testdata/getchoo_glados getchooGladosOut = string(sampleMustGunzip(getchooGladosOutGzip))
getchooGladosOut string //go:embed testdata/getchoo_glados.gz
getchooGladosOutGzip []byte
getchooGladosInstantiated = sampleSplitPaths(getchooGladosInstantiatedRaw) getchooGladosInstantiated = sampleSplitPaths(sampleMustGunzip(getchooGladosInstantiatedGzip))
//go:embed testdata/instantiated/getchoo_glados //go:embed testdata/instantiated/getchoo_glados.gz
getchooGladosInstantiatedRaw string getchooGladosInstantiatedGzip []byte
//go:embed testdata/derivation/show_getchoo_glados.json getchooGladosShow = sampleMustGunzip(getchooGladosShowGzip)
getchooGladosShow []byte //go:embed testdata/derivation/show_getchoo_glados.json.gz
getchooGladosShowGzip []byte
getchooGladosCollective = sampleSplitPaths(getchooGladosCollectiveRaw) getchooGladosCollective = sampleSplitPaths(sampleMustGunzip(getchooGladosCollectiveGzip))
//go:embed testdata/derivation/collect_getchoo_glados //go:embed testdata/derivation/collect_getchoo_glados.gz
getchooGladosCollectiveRaw string getchooGladosCollectiveGzip []byte
//go:embed testdata/format/stdin_getchoo_glados getchooGladosStdin = string(sampleMustGunzip(getchooGladosStdinGzip))
getchooGladosStdin string //go:embed testdata/format/stdin_getchoo_glados.gz
getchooGladosStdinGzip []byte
) )

View File

@ -7,20 +7,23 @@ import (
// git+https://tangled.sh/@pluie.me/flake#pappardelle // git+https://tangled.sh/@pluie.me/flake#pappardelle
var ( var (
//go:embed testdata/pluiedev_pappardelle pluiedevPappardelleOut = string(sampleMustGunzip(pluiedevPappardelleGzip))
pluiedevPappardelleOut string //go:embed testdata/pluiedev_pappardelle.gz
pluiedevPappardelleGzip []byte
pluiedevPappardelleInstantiated = sampleSplitPaths(pluiedevPappardelleInstantiatedRaw) pluiedevPappardelleInstantiated = sampleSplitPaths(sampleMustGunzip(pluiedevPappardelleInstantiatedGzip))
//go:embed testdata/instantiated/pluiedev_pappardelle //go:embed testdata/instantiated/pluiedev_pappardelle.gz
pluiedevPappardelleInstantiatedRaw string pluiedevPappardelleInstantiatedGzip []byte
//go:embed testdata/derivation/show_pluiedev_pappardelle.json pluiedevPappardelleShow = sampleMustGunzip(pluiedevPappardelleShowGzip)
pluiedevPappardelleShow []byte //go:embed testdata/derivation/show_pluiedev_pappardelle.json.gz
pluiedevPappardelleShowGzip []byte
pluiedevPappardelleCollective = sampleSplitPaths(pluiedevPappardelleCollectiveRaw) pluiedevPappardelleCollective = sampleSplitPaths(sampleMustGunzip(pluiedevPappardelleCollectiveGzip))
//go:embed testdata/derivation/collect_pluiedev_pappardelle //go:embed testdata/derivation/collect_pluiedev_pappardelle.gz
pluiedevPappardelleCollectiveRaw string pluiedevPappardelleCollectiveGzip []byte
//go:embed testdata/format/stdin_pluiedev_pappardelle pluiedevPappardelleStdin = string(sampleMustGunzip(pluiedevPappardelleStdinGzip))
pluiedevPappardelleStdin string //go:embed testdata/format/stdin_pluiedev_pappardelle.gz
pluiedevPappardelleStdinGzip []byte
) )

View File

@ -1,6 +1,11 @@
package nix_test package nix_test
import "strings" import (
"bytes"
"compress/gzip"
"io"
"strings"
)
var instSample = map[string]string{ var instSample = map[string]string{
"bad fields": segmentPrefix + `instantiated 'config.sub-948ae97' ` + segmentSuffix, "bad fields": segmentPrefix + `instantiated 'config.sub-948ae97' ` + segmentSuffix,
@ -62,4 +67,16 @@ source path '/nix/store/vdzlppvrdkz9rv14q4j02g9kpjbww2ww-source/pkgs/build-suppo
copying '/nix/store/vdzlppvrdkz9rv14q4j02g9kpjbww2ww-source/pkgs/build-support/bintools-wrapper/ld-wrapper.sh' to the store...` copying '/nix/store/vdzlppvrdkz9rv14q4j02g9kpjbww2ww-source/pkgs/build-support/bintools-wrapper/ld-wrapper.sh' to the store...`
) )
func sampleSplitPaths(s string) []string { return strings.Split(strings.TrimSpace(s), "\n") } func sampleSplitPaths(data []byte) []string {
return strings.Split(strings.TrimSpace(string(data)), "\n")
}
func sampleMustGunzip(data []byte) []byte {
var u []byte
if r, err := gzip.NewReader(bytes.NewReader(data)); err != nil {
panic(err.Error())
} else if u, err = io.ReadAll(r); err != nil {
panic(err.Error())
}
return u
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
testdata/format/stdin_getchoo_atlas.gz vendored Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
testdata/format/stdin_getchoo_glados.gz vendored Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

37432
testdata/getchoo_atlas vendored

File diff suppressed because it is too large Load Diff

BIN
testdata/getchoo_atlas.gz vendored Normal file

Binary file not shown.

84832
testdata/getchoo_glados vendored

File diff suppressed because it is too large Load Diff

BIN
testdata/getchoo_glados.gz vendored Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
testdata/instantiated/getchoo_atlas.gz vendored Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
testdata/instantiated/getchoo_glados.gz vendored Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
testdata/pluiedev_pappardelle.gz vendored Normal file

Binary file not shown.