Skip to content

Commit

Permalink
fix: fixed wrong config extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Gurkengewuerz committed Oct 25, 2024
1 parent 49ceede commit 2269e96
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions internal/judge/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ func (e *Executor) Execute(submission models.Submission) (*models.TestResult, er
newTestCases, err := LoadTestCases(filepath.Join(e.testCaseDir, relPath))

if err == nil {
log.WithFields(field).WithFields(log.Fields{
"Path": relPath,
"TestCases": len(newTestCases),
}).WithError(err).Debug("Loaded test cases")

for i := range newTestCases {
parts := strings.Split(relPath, string(os.PathSeparator))
if len(parts) != 2 {
Expand All @@ -132,10 +137,18 @@ func (e *Executor) Execute(submission models.Submission) (*models.TestResult, er

testCases = append(testCases, newTestCases[i])
}
} else {
log.WithFields(field).WithFields(log.Fields{
"Path": path,
}).WithError(err).Debug("Failed to load test cases")
}

return nil
})
if err != nil {
log.WithFields(field).WithError(err).Debug("WalkDir returned errors")
}

log.WithFields(field).Debugf("Found %d test cases", len(testCases))

result := &models.TestResult{
Expand Down

0 comments on commit 2269e96

Please sign in to comment.