1
0
mirror of synced 2026-02-27 00:39:51 +00:00

New xen-delete-image option --no-xen-ok for disabling xenRunning tests

This commit is contained in:
Axel Beckert
2012-11-27 23:52:02 +01:00
parent 4c3e4abff7
commit 00bb137012
2 changed files with 6 additions and 4 deletions

View File

@@ -23,7 +23,8 @@ xen-delete-image - Delete previously created Xen instances.
--hostname Specify the image name to delete.
Testing options:
--test Don't complain if we're not invoked by root.
--test Don't complain if we're not invoked by root.
--no-xen-ok Don't complain if xen seems not installed or xend is not running
=cut
@@ -221,7 +222,7 @@ E_O_ROOT
#
while ( my $name = shift )
{
if ( !xenRunning($name, \%CONFIG) )
if ( $CONFIG{ 'no_xen_ok' } or !xenRunning($name, \%CONFIG) )
{
deleteXenImage($name);
}
@@ -237,7 +238,7 @@ while ( my $name = shift )
my $hosts = $CONFIG{ 'hostname' };
foreach my $name (@$hosts)
{
if ( !xenRunning($name, \%CONFIG) )
if ( $CONFIG{ 'no_xen_ok' } or !xenRunning($name, \%CONFIG) )
{
deleteXenImage($name);
}
@@ -279,6 +280,7 @@ sub parseCommandLineArguments
"hostname=s@", \$CONFIG{ 'hostname' },
"test", \$CONFIG{ 'test' },
"verbose", \$CONFIG{ 'verbose' },
"no-xen-ok", \$CONFIG{ 'no_xen_ok' },
"help", \$HELP,
"manual", \$MANUAL,
"version", \$VERSION

View File

@@ -75,7 +75,7 @@ close( IMAGE );
# So we need to run the deletion script and verify the images
# are removed correctly.
#
`perl -I./lib -I../lib ./bin/xen-delete-image --test --dir=$dir $hostname`;
`perl -I./lib -I../lib ./bin/xen-delete-image --test --no-xen-ok --dir=$dir $hostname`;
#