Add os cyclic test 65/965/1
authorMiguel Montiel <mm747b@att.com>
Fri, 7 Jun 2019 18:20:58 +0000 (18:20 +0000)
committerMiguel Montiel <mm747b@att.com>
Fri, 7 Jun 2019 18:35:28 +0000 (18:35 +0000)
 - Test to verify latency in os

Change-Id: I49e8d2f0aa62c9ee1f31c0b90fa70b5fa3b24444
Signed-off-by: Miguel Montiel <mm747b@att.com>
tests/os/cylictest/cyclictest.robot [new file with mode: 0644]

diff --git a/tests/os/cylictest/cyclictest.robot b/tests/os/cylictest/cyclictest.robot
new file mode 100644 (file)
index 0000000..f7b6709
--- /dev/null
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2019 AT&T Intellectual Property.                             #
+# Copyright (c) 2019 Nokia.                                                  #
+#                                                                            #
+# Licensed under the Apache License, Version 2.0 (the "License");            #
+# you maynot use this file except in compliance with the License.            #
+#                                                                            #
+# You may obtain a copy of the License at                                    #
+#       http://www.apache.org/licenses/LICENSE-2.0                           #
+#                                                                            #
+# Unless required by applicable law or agreed to in writing, software        #
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
+# See the License for the specific language governing permissions and        #
+# limitations under the License.                                             #
+##############################################################################
+
+
+*** Settings ***
+Library           OperatingSystem
+Library           BuiltIn
+Library           SSHLibrary
+Documentation     Cyclic latency test
+Suite Setup       Open Connection And Log In
+Suite Teardown    Close All Connections
+
+*** Variables ***
+${LOG}             ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')}.log
+#${USERNAME}       mm747b
+#${HOME}           /home/${USERNAME}
+#${HOST}           aknode109
+
+
+*** Test Cases ***
+Latency Test
+    ${output}  ${rc}=      Execute Command    cyclictest --mlockall --smp --priority=80 --interval=200 --distance=0 --duration=2    return_rc=True    sudo=True
+    Append To File         ${LOG}  ${output}${\n}
+    Should Be Equal As Integers  ${rc}  0
+
+
+*** Keywords ***
+Open Connection And Log In
+  Open Connection       ${HOST}
+  Login With Public Key    ${USERNAME}   ${HOME}/.ssh/id_rsa
+