MCPcopy Create free account
hub / github.com/cel-expr/cel-go / updateRunfilesPathForFlags

Function updateRunfilesPathForFlags

tools/celtest/test_runner.go:75–96  ·  view source on GitHub ↗
(testResourcesDir string)

Source from the content-addressed store, hash-verified

73}
74
75func updateRunfilesPathForFlags(testResourcesDir string) error {
76 if testResourcesDir == "" {
77 return nil
78 }
79 paths := make([]*string, 0, 5)
80 if compiler.InferFileFormat(testSuitePath) != compiler.Unspecified {
81 paths = append(paths, &testSuitePath)
82 }
83 if compiler.InferFileFormat(fileDescriptorSetPath) != compiler.Unspecified {
84 paths = append(paths, &fileDescriptorSetPath)
85 }
86 if compiler.InferFileFormat(configPath) != compiler.Unspecified {
87 paths = append(paths, &configPath)
88 }
89 if compiler.InferFileFormat(baseConfigPath) != compiler.Unspecified {
90 paths = append(paths, &baseConfigPath)
91 }
92 if compiler.InferFileFormat(celExpression) != compiler.Unspecified {
93 paths = append(paths, &celExpression)
94 }
95 return UpdateTestResourcesPaths(testResourcesDir, paths)
96}
97
98// UpdateTestResourcesPaths updates the list of paths with their absolute paths as per their location
99// in the testResourcesDir directory. This will allow the executable targets to locate and access the

Callers 1

Calls 2

InferFileFormatFunction · 0.92
UpdateTestResourcesPathsFunction · 0.85

Tested by 1