judge: fix checker copy out for executorserver>1.3 (#222)

This commit is contained in:
Yang Gao authored and GitHub committed 2021-09-29 18:33:26 +08:00
1 parent 3e517aa840
commit f903373ba9
1 file changed
+8 -8
+8 -8
View File
@@ -15,10 +15,10 @@ type Checker = (config: any) => Promise<CheckResult>;
const checkers: Record<string, Checker> = { const checkers: Record<string, Checker> = {
async default(config) { async default(config) {
const { stdout } = await run('/usr/bin/diff -BZ usrout stdout', { const { stdout } = await run('/usr/bin/diff -BZ usrout answer', {
copyIn: { copyIn: {
usrout: { src: config.user_stdout }, usrout: { src: config.user_stdout },
stdout: { src: config.output }, answer: { src: config.output },
...config.copyIn, ...config.copyIn,
}, },
}); });
@@ -61,10 +61,10 @@ const checkers: Record<string, Checker> = {
}, },
async strict(config) { async strict(config) {
const { stdout } = await run('/usr/bin/diff usrout stdout', { const { stdout } = await run('/usr/bin/diff usrout answer', {
copyIn: { copyIn: {
usrout: { src: config.user_stdout }, usrout: { src: config.user_stdout },
stdout: { src: config.output }, answer: { src: config.output },
...config.copyIn, ...config.copyIn,
}, },
}); });
@@ -83,10 +83,10 @@ const checkers: Record<string, Checker> = {
* exit code:返回判断结果 * exit code:返回判断结果
*/ */
async hustoj(config) { async hustoj(config) {
const { code, stdout } = await run('${dir}/checker input stdout usrout', { const { code, stdout } = await run('${dir}/checker input answer usrout', {
copyIn: { copyIn: {
usrout: { src: config.user_stdout }, usrout: { src: config.user_stdout },
stdout: { src: config.output }, answer: { src: config.output },
input: { src: config.input }, input: { src: config.input },
...config.copyIn, ...config.copyIn,
}, },
@@ -108,10 +108,10 @@ const checkers: Record<string, Checker> = {
* argv[6]:输出错误报告的文件 * argv[6]:输出错误报告的文件
*/ */
async lemon(config) { async lemon(config) {
const { files } = await run(`\${dir}/checker input usrout stdout ${config.score} score message`, { const { files } = await run(`\${dir}/checker input usrout answer ${config.score} score message`, {
copyIn: { copyIn: {
usrout: { src: config.user_stdout }, usrout: { src: config.user_stdout },
stdout: { src: config.output }, answer: { src: config.output },
input: { src: config.input }, input: { src: config.input },
...config.copyIn, ...config.copyIn,
}, },