~ubuntu-branches/ubuntu/vivid/gitolite3/vivid-proposed

« back to all changes in this revision

Viewing changes to src/lib/Gitolite/Test.pm

  • Committer: Package Import Robot
  • Author(s): David Bremner
  • Date: 2014-05-25 20:09:36 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20140525200936-el6hezd1fym50pxh
Tags: 3.6-1
* New upstream release
* Depend on ssh-server instead of openssh-server (Closes: #735176).

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
BEGIN {
27
27
    require Gitolite::Test::Tsh;
28
 
    *{'try'}  = \&Tsh::try;
29
 
    *{'put'}  = \&Tsh::put;
30
 
    *{'text'} = \&Tsh::text;
 
28
    *{'try'}   = \&Tsh::try;
 
29
    *{'put'}   = \&Tsh::put;
 
30
    *{'text'}  = \&Tsh::text;
31
31
    *{'lines'} = \&Tsh::lines;
32
 
    *{'cmp'}  = \&Tsh::cmp;
 
32
    *{'cmp'}   = \&Tsh::cmp;
33
33
}
34
34
 
35
35
use strict;
38
38
# ----------------------------------------------------------------------
39
39
 
40
40
# make sure the user is ready for it
41
 
if (not $ENV{GITOLITE_TEST} or $ENV{GITOLITE_TEST} ne 'y') {
 
41
if ( not $ENV{GITOLITE_TEST} or $ENV{GITOLITE_TEST} ne 'y' ) {
42
42
    print "Bail out! See t/README for information on how to run the tests.\n";
43
43
    exit 255;
44
44
}
52
52
    DEF AP_2 = AP_1; git add conf ; ok; git commit -m %1; ok; /master.* %1/
53
53
    DEF ADMIN_PUSH = AP_2 %1; glt push admin origin; ok; gsh; /master -> master/
54
54
 
55
 
    DEF CS_1 = pwd; //tmp/tsh_tempdir.*gitolite-admin/; git remote -v; ok; /file://gitolite-admin/
 
55
    DEF CS_1 = pwd; //tmp/tsh_tempdir.*gitolite-admin/; git remote -v; ok; /file:///gitolite-admin/
56
56
    DEF CHECK_SETUP = CS_1; git log; ok; /fa7564c1b903ea3dce49314753f25b34b9e0cea0/
57
57
 
58
58
    DEF CLONE = glt clone %1 file:///%2
71
71
 
72
72
    # clone admin repo
73
73
    cd tsh_tempdir
74
 
    glt clone admin --progress file://gitolite-admin
 
74
    glt clone admin --progress file:///gitolite-admin
75
75
    cd gitolite-admin
76
76
" or die "could not setup the test environment; errors:\n\n" . text() . "\n\n";
77
77
 
113
113
sub md5sum {
114
114
    my $out = '';
115
115
    for my $file (@_) {
116
 
        $out .= md5_hex(slurp($file)) . "  $file\n";
 
116
        $out .= md5_hex( slurp($file) ) . "  $file\n";
117
117
    }
118
118
    return $out;
119
119
}