Skip to content

Commit

Permalink
Fixed a mounting bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xybu committed Jan 11, 2015
1 parent 8ae694f commit 945b79f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ga-hook/delegates/ga-grader_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,12 @@ def run(self):
if not os.path.isfile(task['temp_path'] + '/test_all'):
logger.critical('grader file "' + task['temp_path'] + '/test_all" not found.')
raise Exception('Executable "test_all" was not found.')
cmd = [task['temp_path'] + '/test_all']

if docker_enabled:
cmd = VirtualizedCmd(cmd, mount=[task['temp_path'] + ':/home'], cwd='/home')
cmd = VirtualizedCmd('/ag/test_all', mount=[task['temp_path'] + ':/ag'], cwd='/ag')
else:
cmd = [task['temp_path'] + '/test_all']

logger.debug(cmd)
subp = subprocess.Popen(cmd, cwd=task['temp_path'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = subp.communicate(None, timeout = grader_timeout)
Expand Down

0 comments on commit 945b79f

Please sign in to comment.