MCPcopy Index your code
hub / github.com/jetify-com/devbox / globScripts

Function globScripts

testscripts/testrunner/testrunner.go:59–74  ·  view source on GitHub ↗

globScripts returns the test script files matching pattern, sorted for a deterministic order (so sharding is stable across runners). The testrunner dir is skipped: it holds the generic testscript used for projects in the examples/ directory, which is run separately (see RunDevboxTestscripts).

(pattern string)

Source from the content-addressed store, hash-verified

57// dir is skipped: it holds the generic testscript used for projects in the
58// examples/ directory, which is run separately (see RunDevboxTestscripts).
59func globScripts(pattern string) []string {
60 scripts, err := doublestar.FilepathGlob(pattern)
61 if err != nil {
62 return nil
63 }
64
65 filtered := scripts[:0]
66 for _, script := range scripts {
67 if filepath.Base(filepath.Dir(script)) == "testrunner" {
68 continue
69 }
70 filtered = append(filtered, script)
71 }
72 sort.Strings(filtered)
73 return filtered
74}
75
76// shard partitions the test scripts across CI runners. The testscripts are
77// bound by per-runner nix work (downloading package closures and evaluating

Callers 1

RunTestscriptsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected