MCPcopy Create free account
hub / github.com/LanceLRQ/deer-executor / RunTestCasesInputValidation

Function RunTestCasesInputValidation

client/packmgr/validator.go:148–170  ·  view source on GitHub ↗

RunTestCasesInputValidation 运行test cases的校验 caseIndex < 0 表示校验全部

(config *structs.JudgeConfiguration, caseIndex int)

Source from the content-addressed store, hash-verified

146// RunTestCasesInputValidation 运行test cases的校验
147// caseIndex < 0 表示校验全部
148func RunTestCasesInputValidation(config *structs.JudgeConfiguration, caseIndex int) error {
149 validator, err := utils.GetCompiledBinaryFileAbsPath("validator", config.TestLib.ValidatorName, config.ConfigDir)
150 if err != nil {
151 return err
152 }
153 // 执行遍历
154 if caseIndex < 0 {
155 for key := range config.TestCases {
156 log.Printf("[validator] run test case #%d", key)
157 err := runTestCase(config.ConfigDir, validator, &config.TestCases[key])
158 if err != nil {
159 return err
160 }
161 }
162 } else {
163 log.Printf("[validator] run test case #%d", caseIndex)
164 err := runTestCase(config.ConfigDir, validator, &config.TestCases[caseIndex])
165 if err != nil {
166 return err
167 }
168 }
169 return nil
170}
171
172// RunTestlibValidators 运行Testlib的validator校验 (APP入口)
173func RunTestlibValidators(c *cli.Context) error {

Callers 1

runTestlibValidatorsFunction · 0.85

Calls 2

runTestCaseFunction · 0.85

Tested by

no test coverage detected