From 3adefd88abf8dff33b02432424fe4a311cb85e1f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 23 Nov 2004 06:51:08 +0000 Subject: [PATCH] Now add ../lib to @INC. --- grading/vm/run-tests | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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. -- 2.30.2