Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
run_in_subprocess works now
Browse files Browse the repository at this point in the history
  • Loading branch information
juchankim committed Aug 17, 2015
1 parent e57d7b7 commit 86e9d55
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
4 changes: 2 additions & 2 deletions features/autograder_xqueue_stubbed.feature
Expand Up @@ -33,13 +33,13 @@ Feature: Autograder configured to accept student submissions from edX and grade
Given an XQueue that has submission "hw5_submission.json" in queue
And has been setup with the config file "conf.yml"
Then I should receive a grade of "0" for my assignment
@require_net_connect
#@require_net_connect
Scenario: student submits a HW3
#Given I set up a test that requires internet connection
Given an XQueue that has submission "hw3_submission.json" in queue
And has been setup with the config file "conf.yml"
Then I should receive a grade of "100" for my assignment
@require_net_connect
#@require_net_connect
Scenario: student submits a HW4
Given I set up a test that requires internet connection
Given an XQueue that has submission "hw4_submission.json" in queue
Expand Down
13 changes: 11 additions & 2 deletions lib/graders/feature_grader/feature_grader.rb
Expand Up @@ -44,8 +44,8 @@ def log(*args)
def dump_output
@comments = @output.join("\n")
end

def grade
def runner_block
begin
load_description

Expand All @@ -67,6 +67,15 @@ def grade
end
end

def grade
response = run_in_subprocess(method(:runner_block))
if response
response
else
ERROR_HASH
end
end

private

def load_description
Expand Down
13 changes: 11 additions & 2 deletions lib/graders/feature_grader/hw4_grader.rb
Expand Up @@ -49,8 +49,8 @@ def log(*args)
def dump_output
@comments = @output.join("\n")
end

def grade
def runner_block
begin
load_description

Expand Down Expand Up @@ -108,6 +108,15 @@ def grade
end
end

def grade
response = run_in_subprocess(method(:runner_block))
if response
response
else
ERROR_HASH
end
end

private

def load_description
Expand Down
Empty file added logs/log.txt
Empty file.
Empty file.
Empty file.

0 comments on commit 86e9d55

Please sign in to comment.