Skip to content

Commit d9b4897

Browse files
committed
fix: diff coomparison is slow for large testcases
1 parent af3db28 commit d9b4897

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM node:8-alpine
22

33
RUN apk add --no-cache docker
4-
RUN apk add build-base
4+
RUN apk add build-base diffutils
55

66
WORKDIR /usr/src/judge-taskmaster
77

src/tasks/scenarios/submission.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class SubmissionScenario extends Scenario {
6666
const expectedOutputFile = path.join(currentTestcasePath, 'stdout')
6767

6868
const diff = exec(`
69-
diff -b -B -a -q ${runOutputFile} ${expectedOutputFile}
69+
diff -b -B -a --suppress-common-lines --speed-large-files ${runOutputFile} ${expectedOutputFile}
7070
`)
7171
const score = diff.code === 0 ? 100 : 0
7272

0 commit comments

Comments
 (0)