Test-Smoke

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

   f9e6db9c-56bf-0310-a82a-abbfb51efdf0
 - (abeltje, Sat, 12 Feb 2005 19:01:40 +0000) * [PRIVATE]
 - add the new chkbcfg.pl script
 - git-svn-id: https://source.test-smoke.org/svn/Test-Smoke@831
   f9e6db9c-56bf-0310-a82a-abbfb51efdf0
 - (abeltje, Sat, 12 Feb 2005 19:52:03 +0000) * [FIX]
 - the DCL in vms_untargz()
 - git-svn-id: https://source.test-smoke.org/svn/Test-Smoke@832
   f9e6db9c-56bf-0310-a82a-abbfb51efdf0
 - (abeltje, Sat, 12 Feb 2005 22:24:20 +0000) * [CHANGE]
 - relocate the source-tree from within the source-dir (File::Find doesn't
   like VMS paths)
 - git-svn-id: https://source.test-smoke.org/svn/Test-Smoke@833
   f9e6db9c-56bf-0310-a82a-abbfb51efdf0

1.19_60 2004-11-20T12:59:32+00:00 (1fc72cc => abeltje)
 - (abeltje, Sat, 20 Nov 2004 12:59:32 +0000) * [CHANGE]
 - BIG reorganisation of the source-tree. Needed to make the distro work on
   OpenVMS.
 - git-svn-id: https://source.test-smoke.org/svn/Test-Smoke@799
   f9e6db9c-56bf-0310-a82a-abbfb51efdf0

lib/Test/Smoke/Syncer/Base.pm  view on Meta::CPAN

    $tree_dir ||= $self->{ddir};

    $self->log_info("Clear source-tree from '$tree_dir' ");
    my $cnt = File::Path::rmtree( $tree_dir, $self->{v} > 1 );

    File::Path::mkpath( $tree_dir, $self->{v} > 1 ) unless -d $tree_dir;
    $self->log_info("clear-source-tree: $cnt items OK");

}

=head2 $syncer->_relocate_tree( $source_dir )

[ Method | Private-ish ]

C<_relocate_tree()> uses B<File::Copy::move()> to move the source-tree
from C<< $source_dir >> to its destination (C<< $self->{ddir} >>).

=cut

sub _relocate_tree {
    my( $self, $source_dir ) = @_;

    require File::Copy;

    $self->{v} and print "relocate source-tree ";

    # try to move it at once (sort of a rename)
    my $ddir = $^O eq 'VMS' ? $self->{vms_ddir} : $self->{ddir};
    my $ok = $source_dir eq $ddir
           ? 1 : File::Copy::move( $source_dir, $self->{ddir} );

    # Failing that: Copy-By-File :-(
    if ( ! $ok && -d $source_dir ) {
        my $cwd = cwd();
        chdir $source_dir or do {

lib/Test/Smoke/Syncer/Snapshot.pm  view on Meta::CPAN


        /^Archive::Tar$/ && do {
            $archive_base = $self->_extract_with_Archive_Tar;
            last EXTRACT;
        };

        # assume a commandline template for $self->{tar}
        $archive_base = $self->_extract_with_external;
    }

    $self->_relocate_tree( $archive_base );

    chdir $cwd or do {
        require Carp;
        Carp::croak( "Can't chdir($extract_base) back: $!" );
    };

    1 while unlink $self->{archive};
}

=head2 $syncer->_extract_with_Archive_Tar( )



( run in 1.313 second using v1.01-cache-2.11-cpan-5511b514fd6 )