diff --git a/package-lock.json b/package-lock.json index 2494028..fb37476 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "acmx", - "version": "0.2.9", + "version": "0.3.0-beta.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/primitives.ts b/src/primitives.ts index 94f3ed0..598687a 100644 --- a/src/primitives.ts +++ b/src/primitives.ts @@ -6,7 +6,7 @@ import { readFileSync, existsSync } from "fs"; export const ATTIC = "attic"; export const TESTCASES = "testcases"; export const LANGUAGES = "languages"; -export const FRIEND_TIMEOUT = 10_000; +export const FRIEND_TIMEOUT = 50_000; //increase limit to allow wcmp to compile TODO: Allow checker to compile without time limit export const MAIN_SOLUTION_BINARY = "sol"; export const CHECKER_BINARY = "checker"; export const BRUTE_BINARY = "brute"; diff --git a/src/runner.ts b/src/runner.ts index 73dd123..6c1e69a 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -84,9 +84,10 @@ export function preRun( path: string, timeout: number ): Option { - debug("pre-run", code); + debug("pre-run", code, output, path, timeout); //add more debug - if (checkMD5(code, path)) { + // check if md5 is same and wcmp is already compiled + if (checkMD5(code, path) && existsSync(output)) { return Option.some(Execution.cached()); }