[Bps-public-commit] r16820 - in Shipwright/trunk: t/hello
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Nov 12 11:39:30 EST 2008
Author: sunnavy
Date: Wed Nov 12 11:39:27 2008
New Revision: 16820
Modified:
Shipwright/trunk/ (props changed)
Shipwright/trunk/t/hello/svk.t
Shipwright/trunk/t/hello/svn.t
Log:
r17711 at sunnavys-mb: sunnavy | 2008-11-13 00:17:46 +0800
tiny changes
Modified: Shipwright/trunk/t/hello/svk.t
==============================================================================
--- Shipwright/trunk/t/hello/svk.t (original)
+++ Shipwright/trunk/t/hello/svk.t Wed Nov 12 11:39:27 2008
@@ -5,9 +5,9 @@
use File::Temp qw/tempdir/;
use File::Copy;
use File::Copy::Recursive qw/dircopy/;
-use File::Spec::Functions qw/catfile catdir/;
+use File::Spec::Functions qw/catfile catdir updir/;
use File::Path qw/rmtree/;
-use Cwd;
+use Cwd qw/getcwd abs_path/;
use Test::More tests => 41;
use Shipwright::Test qw/has_svk create_svk_repo/;
@@ -126,18 +126,17 @@
}
# install
- my $install_dir = tempdir( 'shipwright_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
- $shipwright->build->run( install_base => $install_dir );
+ $shipwright->build->run();
for (
- catfile( $install_dir, 'lib', 'perl5', 'Acme', 'Hello.pm' ),
- catfile( $install_dir, 'etc', 'shipwright-script-wrapper' ),
+ catfile( $shipwright->build->install_base, 'lib', 'perl5', 'Acme', 'Hello.pm' ),
+ catfile( $shipwright->build->install_base, 'etc', 'shipwright-script-wrapper' ),
)
{
ok( -e $_, "$_ exists" );
}
- rmtree( $install_dir );
+ rmtree( abs_path(catdir( $shipwright->build->install_base, updir() )) );
# import another dist
@@ -210,12 +209,15 @@
$shipwright->backend->initialize();
$shipwright->backend->export(
target => $shipwright->build->build_base );
- my $install_dir =
- tempdir( 'shipwright_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
- $shipwright->build->run( install_base => $install_dir );
- ok( -e catfile( $install_dir, 'etc', 'shipwright-script-wrapper' ),
- 'build with 0 packages ok' );
+ $shipwright->build->run();
+ ok(
+ -e catfile(
+ $shipwright->build->install_base, 'etc',
+ 'shipwright-script-wrapper'
+ ),
+ 'build with 0 packages ok'
+ );
+ rmtree( abs_path(catdir( $shipwright->build->install_base, updir() )) );
}
- rmtree( $install_dir );
}
Modified: Shipwright/trunk/t/hello/svn.t
==============================================================================
--- Shipwright/trunk/t/hello/svn.t (original)
+++ Shipwright/trunk/t/hello/svn.t Wed Nov 12 11:39:27 2008
@@ -5,8 +5,8 @@
use File::Temp qw/tempdir/;
use File::Copy;
use File::Copy::Recursive qw/dircopy/;
-use File::Spec::Functions qw/catfile catdir/;
-use Cwd;
+use File::Spec::Functions qw/catfile catdir updir/;
+use Cwd qw/getcwd abs_path/;
use Test::More tests => 17;
use Shipwright::Test qw/has_svn create_svn_repo/;
use File::Path qw/rmtree/;
@@ -89,18 +89,24 @@
}
# install
- my $install_dir = tempdir( 'shipwright_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
- $shipwright->build->run( install_base => $install_dir );
+ $shipwright->build->run();
for (
- catfile( $install_dir, 'lib', 'perl5', 'Acme', 'Hello.pm' ),
- catfile( $install_dir, 'etc', 'shipwright-script-wrapper' ),
+ catfile(
+ $shipwright->build->install_base, 'lib',
+ 'perl5', 'Acme',
+ 'Hello.pm'
+ ),
+ catfile(
+ $shipwright->build->install_base, 'etc',
+ 'shipwright-script-wrapper'
+ ),
)
{
ok( -e $_, "$_ exists" );
}
- rmtree( $install_dir );
+ rmtree( abs_path(catdir( $shipwright->build->install_base, updir() )) );
# import another dist
More information about the Bps-public-commit
mailing list