Add some more checks to driver functions

- Better checking for incorrect password in connect
- Add check for no buck in path for buck build

Change-Id: Ide5c0bd6d74a1a475a75886d5514a8e722436154
diff --git a/TestON/drivers/common/clidriver.py b/TestON/drivers/common/clidriver.py
index 10b5152..43352c5 100644
--- a/TestON/drivers/common/clidriver.py
+++ b/TestON/drivers/common/clidriver.py
@@ -88,6 +88,7 @@
                                       pexpect.TIMEOUT,
                                       refused,
                                       'teston>',
+                                      'Permission denied, please try again.',
                                       self.prompt ],
                                     120 )
             if i == 0:  # Accept key, then expect either a password prompt or access
@@ -106,12 +107,13 @@
                     self.pwd = ""
                 self.handle.sendline( self.pwd )
                 j = self.handle.expect( [
-                                        self.prompt,
                                         'password:|Password:',
+                                        'Permission denied, please try again.',
+                                        self.prompt,
                                         pexpect.EOF,
                                         pexpect.TIMEOUT ],
                                         120 )
-                if j != 0:
+                if j != 2:
                     main.log.error( "Incorrect Password" )
                     return main.FALSE
             elif i == 2:
@@ -130,7 +132,10 @@
                     self.ip_address +
                     " port 22: Connection refused" )
                 return main.FALSE
-            elif i == 6:
+            elif i == 6:  # Incorrect Password
+                main.log.error( "Incorrect Password" )
+                return main.FALSE
+            elif i == 7:  # Prompt
                 main.log.info( "Password not required logged in" )
 
         self.handle.sendline( "" )