[Libsysio-commit] cplant: libsysio/tests test_all.pl test_copy.pl test_getcwd.pl test_list.pl test_p
Brought to you by:
lward
|
From: Sonja T. <so...@us...> - 2003-08-28 13:38:45
|
Update of /cvsroot/libsysio/libsysio/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv32173/libsysio/tests
Modified Files:
Tag: cplant
test_all.pl test_copy.pl test_getcwd.pl test_list.pl
test_path.pl test_stats.pl test_stdfd.pl
Log Message:
Minor bug fixes for tests
Index: test_all.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_all.pl,v
retrieving revision 1.3.4.1
retrieving revision 1.3.4.2
diff -u -w -b -B -p -r1.3.4.1 -r1.3.4.2
--- test_all.pl 21 Aug 2003 17:00:16 -0000 1.3.4.1
+++ test_all.pl 28 Aug 2003 13:38:08 -0000 1.3.4.2
@@ -6,6 +6,7 @@
#
use strict;
+use Cwd 'abs_path';
my $alpha_arg = "";
my $is_broke = 1; # Don't test certain areas known to not work on Cplant
@@ -41,7 +43,7 @@ system("cp $testdir/helper.pm $cwd/tmp_d
if (($alpha_arg eq "") || ($is_broke == 0)) {
# Test getdirentries
- $res = `perl -I$testdir $testdir/test_list.pl $alpha_arg $cwd/tmp_dir`;
+ $res = `perl $testdir/test_list.pl $alpha_arg $cwd/tmp_dir`;
chop($res);
if ($res ne "list test successful") {
print "Basic getdirentries test failed with message: $res\n";
@@ -53,8 +55,9 @@ if (($alpha_arg eq "") || ($is_broke ==
}
# Test path
-my @resarr = `perl -I$testdir $testdir/test_path.pl $alpha_arg $testdir $cwd $cwd/tmp_dir`;
-$res = $testdir.": d\n";
+my $path1 = abs_path($testdir);
+my @resarr = `perl $testdir/test_path.pl $alpha_arg $path1 $cwd $cwd/tmp_dir`;
+$res = $path1.": d\n";
if ($resarr[0] ne $res) {
print "path test returned $resarr[0] instead of $res\n";
$failures++;
@@ -77,7 +80,7 @@ if ($resarr[0] ne $res) {
if (($alpha_arg eq "") || ($is_broke == 0)) {
# Test mount
- $res = `perl -I$testdir $testdir/test_list.pl $alpha_arg -m native:$testdir $cwd/tmp_dir/test2`;
+ $res = `perl $testdir/test_list.pl $alpha_arg -m native:$testdir $cwd/tmp_dir/test2`;
chop($res);
if ($res ne "list test successful") {
print "Mount test failed with message: $res\n";
@@ -87,8 +90,9 @@ if (($alpha_arg eq "") || ($is_broke ==
print "test_mount finished successfully\n";
}
+}
# Test getcwd
- $res = `perl -I$testdir $testdir/test_getcwd.pl $alpha_arg $cwd/tmp_dir/test1`;
+$res = `perl $testdir/test_getcwd.pl $alpha_arg $cwd/tmp_dir/test1`;
chop($res);
if ($res ne "getcwd test successful") {
print "getcwd test failed with message: $res\n";
@@ -97,10 +101,9 @@ if (($alpha_arg eq "") || ($is_broke ==
$success++;
print "test_getcwd finished successfully\n";
}
-}
# Test copy
-$res = `perl -I$testdir $testdir/test_copy.pl $alpha_arg $cwd/tmp_dir/test1/helper.pm $cwd/tmp_dir/helper.pm`;
+$res = `perl $testdir/test_copy.pl $alpha_arg $cwd/tmp_dir/test1/helper.pm $cwd/tmp_dir/helper.pm`;
chop($res);
if ($res ne "copy test successful") {
print "copy test failed with message: $res\n";
@@ -111,7 +114,7 @@ if ($res ne "copy test successful") {
}
# Test stats
-$res = `perl -I$testdir $testdir/test_stats.pl $alpha_arg $cwd/tmp_dir/helper.pm`;
+$res = `perl $testdir/test_stats.pl $alpha_arg $cwd/tmp_dir/helper.pm`;
chop($res);
if ($res ne "stat test successful") {
print "stat test failed with message: $res\n";
@@ -122,7 +125,7 @@ if ($res ne "stat test successful") {
}
# Test stdfd
-$res = `perl -I$testdir $testdir/test_stdfd.pl $alpha_arg foo_dir`;
+$res = `perl $testdir/test_stdfd.pl $alpha_arg foo_dir`;
chop($res);
if ($res ne "test_stdfd successful") {
print "stdfd test failed with message: $res\n";
Index: test_copy.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_copy.pl,v
retrieving revision 1.2.6.1
retrieving revision 1.2.6.2
diff -u -w -b -B -p -r1.2.6.1 -r1.2.6.2
--- test_copy.pl 21 Aug 2003 17:00:17 -0000 1.2.6.1
+++ test_copy.pl 28 Aug 2003 13:38:08 -0000 1.2.6.2
@@ -8,6 +8,8 @@
use IPC::Open2;
use strict;
+use FindBin;
+use lib "$FindBin::Bin";
use helper;
sub usage
Index: test_getcwd.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_getcwd.pl,v
retrieving revision 1.2.6.1
retrieving revision 1.2.6.2
diff -u -w -b -B -p -r1.2.6.1 -r1.2.6.2
--- test_getcwd.pl 21 Aug 2003 17:00:17 -0000 1.2.6.1
+++ test_getcwd.pl 28 Aug 2003 13:38:08 -0000 1.2.6.2
@@ -3,6 +3,8 @@
use IPC::Open2;
use strict;
+use FindBin;
+use lib "$FindBin::Bin";
use helper;
sub usage
Index: test_list.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_list.pl,v
retrieving revision 1.2.6.1
retrieving revision 1.2.6.2
diff -u -w -b -B -p -r1.2.6.1 -r1.2.6.2
--- test_list.pl 21 Aug 2003 17:00:17 -0000 1.2.6.1
+++ test_list.pl 28 Aug 2003 13:38:08 -0000 1.2.6.2
@@ -10,6 +10,9 @@
use IPC::Open2;
use strict;
+
+use FindBin;
+use lib "$FindBin::Bin";
use helper;
sub usage
Index: test_path.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_path.pl,v
retrieving revision 1.2.6.2
retrieving revision 1.2.6.3
diff -u -w -b -B -p -r1.2.6.2 -r1.2.6.3
--- test_path.pl 21 Aug 2003 17:00:18 -0000 1.2.6.2
+++ test_path.pl 28 Aug 2003 13:38:08 -0000 1.2.6.3
@@ -8,6 +8,8 @@
use IPC::Open2;
use strict;
+use FindBin;
+use lib "$FindBin::Bin";
use helper;
use POSIX;
Index: test_stats.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_stats.pl,v
retrieving revision 1.2.6.1
retrieving revision 1.2.6.2
diff -u -w -b -B -p -r1.2.6.1 -r1.2.6.2
--- test_stats.pl 21 Aug 2003 17:00:18 -0000 1.2.6.1
+++ test_stats.pl 28 Aug 2003 13:38:08 -0000 1.2.6.2
@@ -11,6 +11,8 @@
use IPC::Open2;
use strict;
+use FindBin;
+use lib "$FindBin::Bin";
use helper;
sub usage
Index: test_stdfd.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_stdfd.pl,v
retrieving revision 1.2.6.1
retrieving revision 1.2.6.2
diff -u -w -b -B -p -r1.2.6.1 -r1.2.6.2
--- test_stdfd.pl 21 Aug 2003 17:00:18 -0000 1.2.6.1
+++ test_stdfd.pl 28 Aug 2003 13:38:08 -0000 1.2.6.2
@@ -7,6 +7,8 @@
use IPC::Open2;
use strict;
+use FindBin;
+use lib "$FindBin::Bin";
use helper;
sub usage
@@ -134,13 +136,12 @@ $testdir =~ s/\/\w+.pl$//;
}
- my $start = 0;
# Get a stat buffer
my $cmd = '$buf = ALLOC ( $size = CALL sizeof stat )'."\n";
helper::send_cmd($cmdfh, $outfh, "alloc", $cmd);
-
+ if ($is_alpha == 0) {
# Make the test directory
$cmd = "CALL mkdir $dirname 0777\n";
helper::send_cmd($cmdfh, $outfh, "mkdir", $cmd);
@@ -162,7 +163,7 @@ $testdir =~ s/\/\w+.pl$//;
do_open($cmdfh, $outfh, "stdin", "O_RDONLY", 0);
do_open($cmdfh, $outfh, "stdout", "O_WRONLY", 1);
do_open($cmdfh, $outfh, "stderr", "O_WRONLY", 2);
-
+ }
#helper::send_cmd($cmdfh, $outfh, "debug", "CALL debug 5\n");
# Read from stdin, write to stdout and stderr
|