X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=grading%2Fthreads%2Frun-tests;h=bd705e43b2da871acc5e51a3a5d034e8e9bcd646;hb=59385cfe7f0fc5a66dfc1da7c2e5b817edbcae65;hp=534621187ac141ee454913cf0577c612c5a518e6;hpb=78ee2ff83ef8787d0cfd74dafaca125c523ea0d0;p=pintos-anon diff --git a/grading/threads/run-tests b/grading/threads/run-tests index 5346211..bd705e4 100755 --- a/grading/threads/run-tests +++ b/grading/threads/run-tests @@ -51,14 +51,6 @@ die "Don't know how to '$action'"; # Runs $test in directory output/$test. # Returns 'ok' if it went ok, otherwise an explanation. sub run_test { - # Change constants.h if necessary. - my ($defines) = $test ne 'mlfqs-on' ? "" : "#define MLFQS 1\n"; - if ($defines ne snarf ("pintos/src/constants.h")) { - open (CONSTANTS, ">pintos/src/constants.h"); - print CONSTANTS $defines; - close (CONSTANTS); - } - # Changes devices/timer.c if necessary. my ($new_time_slice) = $test eq 'priority-fifo' ? 100 : 1; my (@timer_c) = snarf ("pintos/src/devices/timer.c"); @@ -103,7 +95,9 @@ sub run_test { # Run. my ($timeout) = $test !~ /^mlfqs/ ? 15 : 600; - return run_pintos (["-v", "run", "-q"], + my (@command) = ("-v", "run", "-q"); + push (@command, "-o mlfqs") if $test eq 'mlfqs-on'; + return run_pintos (\@command, CHDIR => "pintos/src/threads/build", LOG => "$test/run", TIMEOUT => $timeout);