File: 004_rsynctest.t.PL

package info (click to toggle)
libsvn-notify-mirror-perl 0.03800-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 172 kB
  • ctags: 25
  • sloc: perl: 1,162; makefile: 38
file content (29 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use Module::Build;
my $filename = shift;

my $mb = Module::Build->current();

if ( $mb->feature('rsync_support') and $mb->notes('rsynctests') ) {
    my $ssh = '';
    if ( $mb->feature('rsyncsshtests') ) {
	$ssh = "'rsync-ssh' => 1";
    }
    open my $FILE, '>', $filename;
    print {$FILE} <<"EOF";
require SVN::Notify;
use Test::More;
require "t/coretests.pm";

SKIP: {
    my \$SVNNOTIFY = \$ENV{'SVNNOTIFY'} || SVN::Notify->find_exe('svnnotify');
    skip "Cannot locate svnnotify binary!", 78
    	unless defined(\$SVNNOTIFY);

    reset_all_tests();
    run_tests(\$SVNNOTIFY, 'rsync-host' => 'localhost', $ssh);
    reset_all_tests();
    run_tests("\$SVNNOTIFY --minimal", 'rsync-host' => 'localhost', $ssh);
}
EOF
    close $FILE;
}