summaryrefslogtreecommitdiff
path: root/yaksh/bash_code_evaluator.py
diff options
context:
space:
mode:
authormaheshgudi2017-10-25 13:16:16 +0530
committermaheshgudi2017-10-25 13:16:16 +0530
commiteaf1735f748279f3c9c313375c51f2f886292934 (patch)
tree57bbcb78ac88ddedd2f3544e115680fe0ab0a028 /yaksh/bash_code_evaluator.py
parent52c0408298a5559cb24f7e2f4251b207546c7d22 (diff)
parente45b9cce359567c28001b34e1ccd14b51130cdb3 (diff)
downloadonline_test-eaf1735f748279f3c9c313375c51f2f886292934.tar.gz
online_test-eaf1735f748279f3c9c313375c51f2f886292934.tar.bz2
online_test-eaf1735f748279f3c9c313375c51f2f886292934.zip
Merge branch '0.7_bugfix' of https://github.com/maheshgudi/online_test into 0.7_bugfix
Diffstat (limited to 'yaksh/bash_code_evaluator.py')
-rw-r--r--yaksh/bash_code_evaluator.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yaksh/bash_code_evaluator.py b/yaksh/bash_code_evaluator.py
index 038d39c..288a744 100644
--- a/yaksh/bash_code_evaluator.py
+++ b/yaksh/bash_code_evaluator.py
@@ -100,13 +100,13 @@ class BashCodeEvaluator(BaseEvaluator):
return False, msg, 0.0
if not clean_test_case_path:
- ret = self._run_command(clean_ref_code_path,
+ ret = self._run_command(["bash", clean_ref_code_path],
stdin=None,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
proc, inst_stdout, inst_stderr = ret
- ret = self._run_command(self.submit_code_path,
+ ret = self._run_command(["bash", self.submit_code_path],
stdin=None,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
@@ -137,7 +137,7 @@ class BashCodeEvaluator(BaseEvaluator):
for tc in test_cases:
loop_count += 1
if valid_answer:
- args = [clean_ref_code_path] + \
+ args = ["bash", clean_ref_code_path] + \
[x for x in tc.split()]
ret = self._run_command(args,
stdin=None,
@@ -147,7 +147,7 @@ class BashCodeEvaluator(BaseEvaluator):
proc, inst_stdout, inst_stderr = ret
if self.file_paths:
self.files = copy_files(self.file_paths)
- args = [self.submit_code_path] + \
+ args = ["bash", self.submit_code_path] + \
[x for x in tc.split()]
ret = self._run_command(args,
stdin=None,