Use regex match for synchronizer log checks

Change-Id: If130b593676e96bd744f11c2d2b074a275feceb5
(cherry picked from commit 158d1ea79e2c27975d6f79ecaa6ada43dff79df6)
diff --git a/src/test/diag/verifyCollectDiag.robot b/src/test/diag/verifyCollectDiag.robot
index 0a89fb8..4dd3e6d 100644
--- a/src/test/diag/verifyCollectDiag.robot
+++ b/src/test/diag/verifyCollectDiag.robot
@@ -55,8 +55,10 @@
 Verify Synchronizer Log
     [Arguments]    ${name}    ${log}
     ${config}    utils.readFile    /opt/cord/orchestration/xos_services/*/xos/synchronizer/@{name}[1]_config.yaml
-    Run Keyword If    'steps_dir' in '''${config}'''    Should Contain    ${log}    Waiting for event or timeout    msg= "Waiting for event or timeout" not found in @{name}[1] synchronizer log
-    ...    ELSE IF    'model_policies_dir' in '''${config}'''    Should Contain    ${log}    Loaded model policies    msg= "Loaded model policies" not found in @{name}[1] synchronizer log
+    ${match1}=    Get Lines Matching Regexp    ${config}    ^steps_dir: ".*"$
+    ${match2}=    Get Lines Matching Regexp    ${config}    ^model_policies_dir: ".*"$
+    Run Keyword If    '${match1}' != '${EMPTY}'    Should Contain    ${log}    Waiting for event or timeout    msg= "Waiting for event or timeout" not found in @{name}[1] synchronizer log
+    ...    ELSE IF    '${match2}' != '${EMPTY}'    Should Contain    ${log}    Loaded model policies    msg= "Loaded model policies" not found in @{name}[1] synchronizer log
 
 Verify ONOS-Fabric
     [Arguments]    ${cord_profile}