]> xenbits.xensource.com Git - people/dariof/xen-tools.git/commitdiff
Properly clean up after t/xt-create-xen-config.t
authorAxel Beckert <abe@deuxchevaux.org>
Thu, 18 Apr 2013 13:31:47 +0000 (15:31 +0200)
committerAxel Beckert <abe@deuxchevaux.org>
Thu, 18 Apr 2013 14:21:25 +0000 (16:21 +0200)
t/xt-create-xen-config.t

index a4cd26e9e8e09b37a3ea1299935eef16b1084776..662e4deba69afbc32a3022264e5e064479e32432 100755 (executable)
@@ -140,7 +140,7 @@ sub runCreateCommand
     #
     #  Create a temporary directory, and make sure it is present.
     #
-    my $dir = File::Temp::tempdir( CLEANUP => 0 );
+    my $dir = File::Temp::tempdir( CLEANUP => 1 );
     ok ( -d $dir, "The temporary directory was created: $dir" );
 
     #
@@ -176,7 +176,7 @@ sub runCreateCommand
     my @LINES = <OUTPUT>;
     close( OUTPUT );
 
-    return( join( "\n", @LINES ) );
+    return( join( "\n", @LINES ), $dir );
 }
 
 
@@ -193,7 +193,7 @@ sub testOutputContains
     my ( $text, %params ) = ( @_ );
 
     # Get the output of running the command.
-    my $output = runCreateCommand( %params );
+    my ($output, $dir) = runCreateCommand( %params );
 
     #
     #  Look to see if we got the text.
@@ -220,7 +220,7 @@ sub noMentionOf
     my ( $text, %params ) = ( @_ );
 
     # Get the output of running the command.
-    my $output = runCreateCommand( %params );
+    my ($output, $dir) = runCreateCommand( %params );
 
     #
     #  Look to see if we got the text.