core: syzoj: testdata_download

This commit is contained in:
undefined committed 2020-12-06 12:40:45 +08:00
1 parent 3469f624ab
commit e593ebd879
5 files changed
+26 -24

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.1.29",
"version": "2.1.30",
"main": "package.json",
"author": "masnn",
"repository": "https://github.com/hydro-dev/Hydro.git",
+8 -9
View File
@@ -165,14 +165,13 @@ async function read1(folder: string, files: string[], checkFile) {
}
async function readAutoCases(folder, { next }) {
const
config = {
checker_type: 'default',
count: 0,
subtasks: [],
judge_extra_files: [],
user_extra_files: [],
};
const config = {
checker_type: 'default',
count: 0,
subtasks: [],
judge_extra_files: [],
user_extra_files: [],
};
const checkFile = ensureFile(folder);
try {
const files = await fs.readdir(folder);
@@ -187,7 +186,7 @@ async function readAutoCases(folder, { next }) {
let result = await read0(folder, files, checkFile);
if (!result.count) result = await read1(folder, files, checkFile);
Object.assign(config, result);
next({ message: { message: 'Found {0} testcases.', params: config.count } });
next({ message: { message: 'Found {0} testcases.', params: [config.count] } });
} catch (e) {
throw new SystemError('Cannot parse testdata.', [e]);
}
-1
View File
@@ -160,7 +160,6 @@ const checkers: Record<string, Checker> = {
},
async testlib(config) {
console.log(config);
const { stderr, status } = await run('${dir}/checker ${dir}/in ${dir}/user_out ${dir}/answer', {
copyIn: {
in: { src: config.input },