diff options
author | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2017-01-27 06:34:06 +0000 |
---|---|---|
committer | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2017-01-31 09:14:31 +0000 |
commit | c9d0d2c9fc16f2e989444bc4d7d8fab8060433ba (patch) | |
tree | 210bc9562ae3bd550ff9d87544b8bc657e032e1f /tests/lib | |
parent | ee4ef36ad0d93ecce542429d49ea368b39940ef9 (diff) |
improve cleanup() in run.sh
- make sure all hosts are unset force_down flag
- load all functions for inspector and installer first in order
to avoid 'command not found' error
- also, print VM if it has error state
Change-Id: If56cba201e1a5f3669a97ffb3d28b3c55c7cdb58
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/inspector | 12 | ||||
-rw-r--r-- | tests/lib/installer | 13 |
2 files changed, 14 insertions, 11 deletions
diff --git a/tests/lib/inspector b/tests/lib/inspector index 2fb7c409..963e9519 100644 --- a/tests/lib/inspector +++ b/tests/lib/inspector @@ -13,11 +13,6 @@ function is_inspector { } function start_inspector { - if ! is_inspector_supported $INSPECTOR_TYPE; then - die $LINENO"INSPECTOR_TYPE=$INSPECTOR_TYPE is not supported." - fi - - source $TOP_DIR/lib/inspectors/$INSPECTOR_TYPE start_inspector_$INSPECTOR_TYPE } @@ -28,3 +23,10 @@ function stop_inspector { function cleanup_inspector { cleanup_inspector_$INSPECTOR_TYPE } + + +if ! is_inspector_supported $INSPECTOR_TYPE; then + die $LINENO"INSPECTOR_TYPE=$INSPECTOR_TYPE is not supported." +fi + +source $TOP_DIR/lib/inspectors/$INSPECTOR_TYPE diff --git a/tests/lib/installer b/tests/lib/installer index cdde6eff..807023f3 100644 --- a/tests/lib/installer +++ b/tests/lib/installer @@ -15,12 +15,6 @@ function is_installer { } function setup_installer { - if ! is_installer_supported $INSTALLER_TYPE; then - die $LINENO"INSTALLER_TYPE=$INSTALLER_TYPE is not supported." - fi - - source $TOP_DIR/lib/installers/$INSTALLER_TYPE - if ! is_set INSTALLER_IP; then get_installer_ip fi @@ -32,3 +26,10 @@ function setup_installer { function cleanup_installer { cleanup_installer_$INSTALLER_TYPE } + + +if ! is_installer_supported $INSTALLER_TYPE; then + die $LINENO"INSTALLER_TYPE=$INSTALLER_TYPE is not supported." +fi + +source $TOP_DIR/lib/installers/$INSTALLER_TYPE |