VOL-2668 Write separate wpa logs, fix regexp match for remote file

Change-Id: I2f58d524ec1fdacd25db886f1b9f381acfdc7796
diff --git a/cord-robot/CORDRobot/rf-resources/Subscriber.resource b/cord-robot/CORDRobot/rf-resources/Subscriber.resource
index 232d87a..7951b54 100644
--- a/cord-robot/CORDRobot/rf-resources/Subscriber.resource
+++ b/cord-robot/CORDRobot/rf-resources/Subscriber.resource
@@ -76,8 +76,9 @@
     ...    Requested packet should exist on src.
     [Arguments]    ${iface}    ${conf_file}    ${ip}    ${user}    ${pass}=${None}
     ...    ${container_type}=${None}    ${container_name}=${None}
+    ...    ${wpa_log}='/tmp/wpa.log'
     Login And Run Command On Remote System
-    ...    rm -f /tmp/wpa.log; wpa_supplicant -B -i ${iface} -Dwired -c /etc/wpa_supplicant/${conf_file} -f /tmp/wpa.log
+    ...    rm -f ${wpa_log}; wpa_supplicant -B -i ${iface} -Dwired -c /etc/wpa_supplicant/${conf_file} -f ${wpa_log}
     ...    ${ip}    ${user}    ${pass}    ${container_type}    ${container_name}
 
 Validate Authentication
@@ -85,19 +86,20 @@
     ...    auth_pass determines if authentication should pass
     [Arguments]    ${auth_pass}    ${iface}    ${conf_file}    ${ip}    ${user}    ${pass}=${None}
     ...    ${container_type}=${None}    ${container_name}=${None}
+    ...    ${wpa_log}='/tmp/wpa.log'
     Send EAPOL Message    ${iface}    ${conf_file}    ${ip}    ${user}    ${pass}
-    ...    ${container_type}    ${container_name}
+    ...    ${container_type}    ${container_name}    ${wpa_log}
     # FIXME: Use an If/Else block, not Three separate checks, bools instead of truthy strings
     Run Keyword If    '${auth_pass}' == 'True'
     ...    Wait Until Keyword Succeeds    120s    2s
     ...    Check Remote File Contents    True
-    ...    /tmp/wpa.log    authentication completed successfully
+    ...    ${wpa_log}    ${iface}.*authentication completed successfully
     ...    ${ip}    ${user}    ${pass}    ${container_type}    ${container_name}
     Run Keyword If    '${auth_pass}' == 'False'
     ...    Sleep    20s
     Run Keyword If    '${auth_pass}' == 'False'
     ...    Check Remote File Contents    False
-    ...    /tmp/wpa.log    authentication completed successfully
+    ...    ${wpa_log}    ${iface}.*authentication completed successfully
     ...    ${ip}    ${user}    ${pass}    ${container_type}    ${container_name}
 
 Run Multicast Client
diff --git a/cord-robot/CORDRobot/rf-resources/utils.resource b/cord-robot/CORDRobot/rf-resources/utils.resource
index d85fa20..1aaeb42 100644
--- a/cord-robot/CORDRobot/rf-resources/utils.resource
+++ b/cord-robot/CORDRobot/rf-resources/utils.resource
@@ -193,18 +193,18 @@
     Should Be Equal As Integers    ${rc}    0
 
 Check Remote File Contents
-    [Documentation]    Check if file on remote system matches a `grep` regex
+    [Documentation]    Check if file on remote system matches a Robot regex
     [Arguments]    ${file_should_exist}    ${file}    ${pattern}
     ...    ${ip}    ${user}    ${pass}=${None}
     ...    ${container_type}=${None}    ${container_name}=${None}    ${prompt}=~$
     ${output}=    Login And Run Command On Remote System
-    ...    cat ${file} | grep '${pattern}'
+    ...    cat ${file}
     ...    ${ip}    ${user}    ${pass}    ${container_type}    ${container_name}    ${prompt}
     # FIXME: Comparison against truthy value
     Run Keyword If    '${file_should_exist}' == 'True'
-    ...    Should Contain    ${output}    ${pattern}
+    ...    Should Match Regexp    ${output}    ${pattern}
     ...    ELSE
-    ...    Should Not Contain    ${output}    ${pattern}
+    ...    Should Not Match Regexp    ${output}    ${pattern}
 
 Set Deployment Config Variables
     [Documentation]    Parses through the given deployment config and sets all the "src" and "dst" variables