FIX: check OS on DUT instead on host 42/11242/4
authorJan Gelety <jgelety@cisco.com>
Tue, 20 Mar 2018 15:25:31 +0000 (16:25 +0100)
committerJan Gelety <jgelety@cisco.com>
Thu, 22 Mar 2018 10:03:21 +0000 (10:03 +0000)
CSIT-1010

Change-Id: I21303c22a50c0fe7914f769aca61ef350287ccb5
Signed-off-by: Jan Gelety <jgelety@cisco.com>
resources/libraries/python/DUTSetup.py

index 2939d74..5b70bd6 100644 (file)
@@ -474,7 +474,9 @@ class DUTSetup(object):
                 ssh = SSH()
                 ssh.connect(node)
 
-                if os.path.isfile("/etc/redhat-release"):
+                cmd = "[[ -f /etc/redhat-release ]]"
+                return_code, _, _ = ssh.exec_command(cmd)
+                if int(return_code) == 0:
                     # workaroud - uninstall existing vpp installation until
                     # start-testcase script is updated on all virl servers
                     rpm_pkgs_remove = "vpp*"

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.