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

Function initWorkRoot

test/util.go:18–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16)
17
18func initWorkRoot() error {
19 _, filename, _, _ := runtime.Caller(1)
20 workPath, err := filepath.Abs(path.Dir(path.Dir(filename)))
21 if err != nil {
22 return err
23 }
24 err = os.Chdir(workPath)
25 if err != nil {
26 return err
27 }
28 err = provider.PlaceCompilerCommands("./compilers.json")
29 if err != nil {
30 return err
31 }
32 err = constants.PlaceMemorySizeForJIT("./jit_memory.json")
33 if err != nil {
34 return err
35 }
36 return nil
37}
38
39func runJudge(conf, codeFile, codeLang string) (*commonStructs.JudgeResult, error) {
40 session, err := executor.NewSession(conf)

Callers 15

TestAPlusBProblemAcFunction · 0.85
TestAPlusBProblemPE1Function · 0.85
TestAPlusBProblemPE2Function · 0.85
TestAPlusBProblemPE3Function · 0.85
TestAPlusBProblemCEFunction · 0.85
TestAPlusBProblemMLEFunction · 0.85
TestAPlusBProblemOLEFunction · 0.85
TestAPlusBProblemOLE2Function · 0.85
TestAPlusBProblemREFunction · 0.85
TestAPlusBProblemRE2Function · 0.85
TestAPlusBProblemTLEFunction · 0.85
TestAPlusBProblemTLE2Function · 0.85

Calls 2

PlaceCompilerCommandsFunction · 0.92
PlaceMemorySizeForJITFunction · 0.92

Tested by 15

TestAPlusBProblemAcFunction · 0.68
TestAPlusBProblemPE1Function · 0.68
TestAPlusBProblemPE2Function · 0.68
TestAPlusBProblemPE3Function · 0.68
TestAPlusBProblemCEFunction · 0.68
TestAPlusBProblemMLEFunction · 0.68
TestAPlusBProblemOLEFunction · 0.68
TestAPlusBProblemOLE2Function · 0.68
TestAPlusBProblemREFunction · 0.68
TestAPlusBProblemRE2Function · 0.68
TestAPlusBProblemTLEFunction · 0.68
TestAPlusBProblemTLE2Function · 0.68