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:
parent
55933ccfb3
commit
66a4079114
@ -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
|
||||||
)
|
)
|
||||||
|
@ -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
|
||||||
)
|
)
|
||||||
|
@ -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
|
||||||
)
|
)
|
||||||
|
@ -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
|
||||||
|
}
|
||||||
|
15013
testdata/derivation/collect_getchoo_atlas
vendored
15013
testdata/derivation/collect_getchoo_atlas
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/derivation/collect_getchoo_atlas.gz
vendored
Normal file
BIN
testdata/derivation/collect_getchoo_atlas.gz
vendored
Normal file
Binary file not shown.
25109
testdata/derivation/collect_getchoo_glados
vendored
25109
testdata/derivation/collect_getchoo_glados
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/derivation/collect_getchoo_glados.gz
vendored
Normal file
BIN
testdata/derivation/collect_getchoo_glados.gz
vendored
Normal file
Binary file not shown.
24847
testdata/derivation/collect_pluiedev_pappardelle
vendored
24847
testdata/derivation/collect_pluiedev_pappardelle
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/derivation/collect_pluiedev_pappardelle.gz
vendored
Normal file
BIN
testdata/derivation/collect_pluiedev_pappardelle.gz
vendored
Normal file
Binary file not shown.
638437
testdata/derivation/show_getchoo_atlas.json
vendored
638437
testdata/derivation/show_getchoo_atlas.json
vendored
File diff suppressed because one or more lines are too long
BIN
testdata/derivation/show_getchoo_atlas.json.gz
vendored
Normal file
BIN
testdata/derivation/show_getchoo_atlas.json.gz
vendored
Normal file
Binary file not shown.
1109317
testdata/derivation/show_getchoo_glados.json
vendored
1109317
testdata/derivation/show_getchoo_glados.json
vendored
File diff suppressed because one or more lines are too long
BIN
testdata/derivation/show_getchoo_glados.json.gz
vendored
Normal file
BIN
testdata/derivation/show_getchoo_glados.json.gz
vendored
Normal file
Binary file not shown.
1139733
testdata/derivation/show_pluiedev_pappardelle.json
vendored
1139733
testdata/derivation/show_pluiedev_pappardelle.json
vendored
File diff suppressed because one or more lines are too long
BIN
testdata/derivation/show_pluiedev_pappardelle.json.gz
vendored
Normal file
BIN
testdata/derivation/show_pluiedev_pappardelle.json.gz
vendored
Normal file
Binary file not shown.
15013
testdata/format/stdin_getchoo_atlas
vendored
15013
testdata/format/stdin_getchoo_atlas
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/format/stdin_getchoo_atlas.gz
vendored
Normal file
BIN
testdata/format/stdin_getchoo_atlas.gz
vendored
Normal file
Binary file not shown.
25109
testdata/format/stdin_getchoo_glados
vendored
25109
testdata/format/stdin_getchoo_glados
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/format/stdin_getchoo_glados.gz
vendored
Normal file
BIN
testdata/format/stdin_getchoo_glados.gz
vendored
Normal file
Binary file not shown.
24847
testdata/format/stdin_pluiedev_pappardelle
vendored
24847
testdata/format/stdin_pluiedev_pappardelle
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/format/stdin_pluiedev_pappardelle.gz
vendored
Normal file
BIN
testdata/format/stdin_pluiedev_pappardelle.gz
vendored
Normal file
Binary file not shown.
37432
testdata/getchoo_atlas
vendored
37432
testdata/getchoo_atlas
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/getchoo_atlas.gz
vendored
Normal file
BIN
testdata/getchoo_atlas.gz
vendored
Normal file
Binary file not shown.
84832
testdata/getchoo_glados
vendored
84832
testdata/getchoo_glados
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/getchoo_glados.gz
vendored
Normal file
BIN
testdata/getchoo_glados.gz
vendored
Normal file
Binary file not shown.
6279
testdata/instantiated/getchoo_atlas
vendored
6279
testdata/instantiated/getchoo_atlas
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/instantiated/getchoo_atlas.gz
vendored
Normal file
BIN
testdata/instantiated/getchoo_atlas.gz
vendored
Normal file
Binary file not shown.
10730
testdata/instantiated/getchoo_glados
vendored
10730
testdata/instantiated/getchoo_glados
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/instantiated/getchoo_glados.gz
vendored
Normal file
BIN
testdata/instantiated/getchoo_glados.gz
vendored
Normal file
Binary file not shown.
10686
testdata/instantiated/pluiedev_pappardelle
vendored
10686
testdata/instantiated/pluiedev_pappardelle
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/instantiated/pluiedev_pappardelle.gz
vendored
Normal file
BIN
testdata/instantiated/pluiedev_pappardelle.gz
vendored
Normal file
Binary file not shown.
108599
testdata/pluiedev_pappardelle
vendored
108599
testdata/pluiedev_pappardelle
vendored
File diff suppressed because it is too large
Load Diff
BIN
testdata/pluiedev_pappardelle.gz
vendored
Normal file
BIN
testdata/pluiedev_pappardelle.gz
vendored
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user