Skip to content

Commit

Permalink
Committer: Tamio Vesa Nakajima <[email protected]>
Browse files Browse the repository at this point in the history
On branch master
Your branch is up-to-date with 'origin/master'.
 Changes to be committed:
	modified:   src/lib.sh

Refactored lib.sh
  • Loading branch information
Tamio Vesa Nakajima authored and Tamio Vesa Nakajima committed May 20, 2018
1 parent 4c43c4c commit 743c99e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ maybecp () {
fi
}

# Evaluates the binary $1 with test $2, returning the message in $message, the time used in $timeUsed and the points in $points
evaluate_src_test () {
# Run the binary $1 with test $2, returning the time used in timeUsed, and leaving the output file in stage/$problemname.out
run_src_test () {
binary=$1
testname=$2

Expand Down Expand Up @@ -69,7 +69,14 @@ evaluate_src_test () {
| awk -F ' ' '{print $2}' \
| awk -F 'm' '{print $2}' \
| awk -F 's' '{print $1}' && cd ..)
}

# Evaluates the binary $1 with test $2, returning the message in $message, the time used in $timeUsed and the points in $points
evaluate_src_test () {
binary=$1
testname=$2

run_src_test $binary $testname
if (( $(echo "$timeUsed > $timelimit" | bc -l))) ; then
# Set the return values
# timeUsed is already set
Expand Down

0 comments on commit 743c99e

Please sign in to comment.