From: Ben Pfaff Date: Tue, 23 Nov 2004 06:51:08 +0000 (+0000) Subject: Now add ../lib to @INC. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3adefd88abf8dff33b02432424fe4a311cb85e1f;p=pintos-anon Now add ../lib to @INC. --- diff --git a/grading/vm/run-tests b/grading/vm/run-tests index b6987fe..161a6a8 100755 --- a/grading/vm/run-tests +++ b/grading/vm/run-tests @@ -1,5 +1,14 @@ #! /usr/bin/perl +# Find the directory that contains the grading files. +our ($GRADES_DIR); + +BEGIN { + ($GRADES_DIR = $0) =~ s#/[^/]+$##; + -d $GRADES_DIR or die "$GRADES_DIR: stat: $!\n"; + unshift @INC, "$GRADES_DIR/../lib"; +} + use warnings; use strict; use POSIX; @@ -97,11 +106,6 @@ if ($grade) { exit 0; } -# Find the directory that contains the grading files. -our ($GRADES_DIR); -($GRADES_DIR = $0) =~ s#/[^/]+$##; --d $GRADES_DIR or die "$GRADES_DIR: stat: $!\n"; - if ($clean) { # Verify that we're roughly in the correct directory # before we go blasting away files.