mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
judge: fix pretest for standalone judge
This commit is contained in:
1 parent
ecc1e10664
commit
c86b063415
4 files changed
+4
-16
No files matched your search
@@ -67,8 +67,7 @@ class JudgeTask {
|
||||
tmpfs.mount(this.tmpdir, '512m');
|
||||
log.info('Submission: %s/%s/%s pid=%s', this.host, this.domainId, this.rid, this.pid);
|
||||
try {
|
||||
if (this.input) await this.doPretest();
|
||||
else await this.doSubmission();
|
||||
await this.doSubmission();
|
||||
} catch (e) {
|
||||
if (e instanceof CompileError) {
|
||||
this.next({ compiler_text: compilerText(e.stdout, e.stderr) });
|
||||
@@ -107,17 +106,6 @@ class JudgeTask {
|
||||
await judge[this.config.type || 'default'].judge(this);
|
||||
}
|
||||
|
||||
async doPretest() {
|
||||
this.folder = path.resolve(this.tmpdir, 'data');
|
||||
await this.session.recordPretestData(this.rid, this.folder);
|
||||
this.config = await readCases(
|
||||
this.folder,
|
||||
{ detail: this.session.config.detail },
|
||||
{ next: this.next },
|
||||
);
|
||||
await judge[this.config.type || 'default'].judge(this);
|
||||
}
|
||||
|
||||
next(data, id?: number) {
|
||||
log.debug('Next: %d %o', id, data);
|
||||
data.key = 'next';
|
||||
|
||||
Reference in new issue
Block a user