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

Function GetOrCreateBinaryRoot

executor/utils.go:85–95  ·  view source on GitHub ↗

GetOrCreateBinaryRoot 获取二进制文件的目录

(config *commonStructs.JudgeConfiguration)

Source from the content-addressed store, hash-verified

83
84// GetOrCreateBinaryRoot 获取二进制文件的目录
85func GetOrCreateBinaryRoot(config *commonStructs.JudgeConfiguration) (string, error) {
86 binRoot := path.Join(config.ConfigDir, "bin")
87 _, err := os.Stat(binRoot)
88 if err != nil && os.IsNotExist(err) {
89 err = os.MkdirAll(binRoot, 0775)
90 if err != nil {
91 return "", errors.Errorf("cannot create binary work directory: %s", err.Error())
92 }
93 }
94 return binRoot, nil
95}
96
97// CompileSpecialJudgeCodeFile 普通特殊评测的编译方法
98func CompileSpecialJudgeCodeFile(source, name, binRoot, configDir, libraryDir, lang string) (string, error) {

Callers 2

compileWorkCodeFilesFunction · 0.92
compileJudgerProgramMethod · 0.85

Calls 2

ErrorfMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected