diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-12-14 02:20:25 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-12-14 02:20:25 +0000 |
commit | e050aba713d4b048588a9199ccf396c53910eb07 (patch) | |
tree | 7c7c09cb6d001481bebea4f21516243b60ae5b7d /bin/PerlACE | |
parent | b33cc37d9795efcec8e33f561536927f207cae43 (diff) | |
download | ATCD-e050aba713d4b048588a9199ccf396c53910eb07.tar.gz |
ChangeLogTag:Thu Dec 13 18:18:42 2000 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'bin/PerlACE')
-rw-r--r-- | bin/PerlACE/ConfigList.pm | 23 | ||||
-rw-r--r-- | bin/PerlACE/Run_Test.pm | 35 |
2 files changed, 34 insertions, 24 deletions
diff --git a/bin/PerlACE/ConfigList.pm b/bin/PerlACE/ConfigList.pm index dbfcee5b70b..f2546d844d9 100644 --- a/bin/PerlACE/ConfigList.pm +++ b/bin/PerlACE/ConfigList.pm @@ -4,10 +4,31 @@ package PerlACE::ConfigList; use strict; use FileHandle; +@PerlACE::ConfigList::Configs = (); + +my @new_argv = (); + +for(my $i = 0; $i <= $#ARGV; ++$i) { + if ($ARGV[$i] eq '-Config') { + if (defined $ARGV[$i + 1]) { + push @PerlACE::ConfigList::Configs, $ARGV[++$i]; + } + else { + print STDERR "You must pass a configuration with Config\n"; + exit(1); + } + } + else { + push @new_argv, $ARGV[$i]; + } +} +@ARGV = @new_argv; + + sub new () { my $self = {}; - @{$self->{MY_CONFIGS}} = @::CONFIGS; + @{$self->{MY_CONFIGS}} = @PerlACE::ConfigList::Configs; bless $self; return $self; } diff --git a/bin/PerlACE/Run_Test.pm b/bin/PerlACE/Run_Test.pm index f41bfccf8bc..08ab4fa22f2 100644 --- a/bin/PerlACE/Run_Test.pm +++ b/bin/PerlACE/Run_Test.pm @@ -3,35 +3,24 @@ # This module contains a few miscellanous functions and some # startup ARGV processing that is used by all tests. -# @todo Move config into Config -@CONFIGS = (); - use PerlACE::Process; +use PerlACE::ConfigList; + package PerlACE; +use Cwd; -sub CheckForConfig +sub LocalFile ($) { - my @new_argv = (); - - for($i = 0; $i <= $#ARGV; ++$i) { - if ($ARGV[$i] eq '-Config') { - if (defined $ARGV[$i + 1]) { - push @::CONFIGS, $ARGV[++$i]; - } - else { - print STDERR "You must pass a directory with Config\n"; - exit(1); - } - } - else { - push @new_argv, $ARGV[$i]; - } - } - @ARGV = @new_argv; -} + my $file = shift; -CheckForConfig (); + my $newfile = getcwd () . '/' . $file; + if ($^O eq "MSWin32") { + $newfile =~ s/\//\\/g; + } + + return $newfile; +} # Returns a unique id, uid for unix, last digit of IP for NT |