Check the result of atomix-install script
Change-Id: I159cafd682d5ef29da9ebe8a8050562169f59175
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 2593b6e..80c682d 100755
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -2822,10 +2822,26 @@
main.log.info( self.name + ": Atomix is already installed on " + node )
self.handle.expect( self.prompt )
return main.TRUE
- elif i == 2 or i == 3:
+ elif i == 2:
main.log.info( self.name + ": Atomix was installed on " + node )
self.handle.expect( self.prompt )
return main.TRUE
+ elif i == 3:
+ self.handle.sendline( "echo Return code: $?" )
+ self.handle.expect( "\$\?" )
+ self.handle.expect( self.prompt )
+ main.log.debug( self.handle.before + self.handle.before )
+ match = re.search( "Return code: (\d+)", self.handle.before )
+ if match:
+ exitCode = int( match.group( 1 ) )
+ else:
+ # Didn't match pattern
+ main.log.error( "Could not parse exit code of atomix-install" )
+ return main.FALSE
+ if exitCode == 0:
+ return main.TRUE
+ else:
+ return main.FALSE
elif i == 4:
# timeout
main.log.info( self.name + ": Installation of Atomix on " + node + " timed out" )
diff --git a/TestON/tests/dependencies/ONOSSetup.py b/TestON/tests/dependencies/ONOSSetup.py
index 547222b..a601569 100644
--- a/TestON/tests/dependencies/ONOSSetup.py
+++ b/TestON/tests/dependencies/ONOSSetup.py
@@ -325,7 +325,7 @@
main.step( "Installing Atomix" )
atomixInstallResult = main.TRUE
- cluster.installAtomix( parallel )
+ atomixInstallResult = cluster.installAtomix( parallel )
utilities.assert_equals( expect=main.TRUE,
actual=atomixInstallResult,
onpass="Successfully installed Atomix",