/[fuse.before_github]/perl-llin/test/helper.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /perl-llin/test/helper.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (hide annotations)
Thu Nov 11 14:44:15 2004 UTC (19 years, 4 months ago) by mszeredi
Original Path: perl/trunk/test/helper.pm
File size: 670 byte(s)
Initial revision

1 mszeredi 4 #!/usr/bin/perl
2     package test::helper;
3     use strict;
4     use Exporter;
5     our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
6     @ISA = "Exporter";
7     @EXPORT_OK = qw($_loop $_point $_pidfile $_real);
8     our($_loop, $_point, $_pidfile, $_real) = ("examples/loopback.pl","/mnt","test/s/mounted.pid","/tmp/fusetest");
9     if($0 !~ qr|s/u?mount\.t$|) {
10     my ($reject) = 1;
11     if(-f $_pidfile) {
12     unless(system("ps `cat $_pidfile` | grep \"$_loop $_point\" >/dev/null")>>8) {
13     if(`mount | grep "on $_point"`) {
14     $reject = 0;
15     } else {
16     system("kill `cat $_pidfile`");
17     }
18     }
19     }
20     $reject = 1 if (system("ls $_point >&/dev/null") >> 8);
21     die "not properly mounted\n" if $reject;
22     }
23     1;

  ViewVC Help
Powered by ViewVC 1.1.26