[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 3/6] mg-allocate: Break out sub precheck (nfc)
Signed-off-by: Ian Jackson <iwj@xxxxxxxxxxxxxx> --- mg-allocate | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mg-allocate b/mg-allocate index 14c46e0cc..8eca59e2c 100755 --- a/mg-allocate +++ b/mg-allocate @@ -647,14 +647,16 @@ if (defined $donate_spec) { if grep { m/^!/ } @ARGV; } +sub precheck () { + logm("pre-checking resources (dry run)..."); + local $Osstest::TestSupport::logm_prefix = $logm_prefix.' (precheck)'; + execute(1); +} + if ($duration) { die "--donate and --steal are incompatible with the planning system\n" - if @steal_specs || defined $donate_spec; - { - logm("pre-checking resources (dry run)..."); - local $Osstest::TestSupport::logm_prefix = $logm_prefix.' (precheck)'; - execute(1); - }; + if @steal_specs || defined $donate_spec; + precheck(); plan(); } else { execute(); -- 2.20.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |