Port change 17065 to cord-tester repo
Change-Id: I09df00b965e40a49ea3ba1d4fbc03f99d761dbba
diff --git a/src/test/cord-api/Framework/utils/testCaseUtils.py b/src/test/cord-api/Framework/utils/testCaseUtils.py
index 58b1478..1d2d021 100755
--- a/src/test/cord-api/Framework/utils/testCaseUtils.py
+++ b/src/test/cord-api/Framework/utils/testCaseUtils.py
@@ -107,9 +107,12 @@
)
child.expect(r"[pP]assword:")
child.sendline("karaf")
- child.expect(r"(\x1b\[\d*;?\d+m){1,2}(onos>|karaf@root >) (\x1b\[\d*;?\d+m){1,2}")
+ # Expected prompt:
+ # onos> (ONOS 1.x)
+ # karaf@root > (ONOS 2.x)
+ child.expect([r'(\x1b\[\d*;?\d+m){1,2}onos> (\x1b\[\d*;?\d+m){1,2}', r'karaf@root >'])
child.sendline(cmd)
- child.expect(r"(\x1b\[\d*;?\d+m){1,2}(onos>|karaf@root >) (\x1b\[\d*;?\d+m){1,2}")
+ child.expect([r'(\x1b\[\d*;?\d+m){1,2}onos> (\x1b\[\d*;?\d+m){1,2}', r'karaf@root >'])
output.write(child.before)