Skip to content
Snippets Groups Projects
Commit 815eb49d authored by robinwilliam.hundt's avatar robinwilliam.hundt
Browse files

CompileTest is Ubuntu compatible, Link and Unit not

parent 1b57425b
No related branches found
No related tags found
1 merge request!137CompileTest is Ubuntu compatible, Link and Unit not
Pipeline #88982 passed
...@@ -20,7 +20,7 @@ log = logging.getLogger(__name__) ...@@ -20,7 +20,7 @@ log = logging.getLogger(__name__)
def run_cmd(cmd, stdin=None, check=False, timeout=1): def run_cmd(cmd, stdin=None, check=False, timeout=1):
return subprocess.run( return subprocess.run(
'ulimit -v 1024; gtimeout 0.2 ' + cmd, 'timeout 1 ' + cmd,
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
input=stdin, input=stdin,
...@@ -123,7 +123,7 @@ class CompileTest(Test): ...@@ -123,7 +123,7 @@ class CompileTest(Test):
def run_test(self, submission_obj): def run_test(self, submission_obj):
ret = run_cmd( ret = run_cmd(
"gcc-7 -std=c11 -Wall -c -xc -Icode-testing -o code.o -", "gcc -Wall -c -x c -std=c11 -Icode-testing -o code.o -",
submission_obj['code']) submission_obj['code'])
return not ret.returncode, ret.stderr return not ret.returncode, ret.stderr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment