1*** Settings ***
2
3Documentation  Check processor speed.
4
5# Test Parameters:
6# OPENBMC_HOST   The BMC host name or IP address.
7# OS_HOST        The OS host name or IP Address.
8# OS_USERNAME    The OS login userid (usually root).
9# OS_PASSWORD    The password for the OS login.
10
11Resource        ../lib/os_utilities.robot
12
13Suite Setup      Run Keyword  Start SOL Console Logging
14Test Setup       Test Setup Execution
15Test Teardown    Test Teardown Execution
16
17Test Tags       Proc_Freq_Check
18
19*** Test Cases ***
20
21Processor Speed Check
22    [Documentation]  Check processor speed.
23    [Tags]  Processor_Speed_Check
24
25    ${actual_min_freq}=  Get CPU Min Frequency
26    ${min_freq_designated_lower_limit}=  Get CPU Min Frequency Limit
27
28    Printn
29    Rpvars  actual_min_freq  min_freq_designated_lower_limit
30
31    ${err_msg}=  Catenate  Reported CPU frequency below designated limit.
32    Should Be True  ${actual_min_freq} >= ${min_freq_designated_lower_limit}
33    ...  msg=${err_msg}
34
35    ${actual_max_freq}=  Get CPU Max Frequency
36    ${max_freq_designated_limit}=  Get CPU Max Frequency Limit
37
38    Rpvars  actual_max_freq  max_freq_designated_limit
39
40    ${err_msg}=  Catenate  Reported CPU frequency above designated limit.
41    Should Be True  ${actual_max_freq} <= ${max_freq_designated_limit}
42    ...  msg=${err_msg}
43
44    Error Logs Should Not Exist
45
46
47*** Keywords ***
48
49Test Setup Execution
50    [Documentation]  Do the pre-test setup.
51
52    REST Power On  stack_mode=skip
53    Delete All Error Logs
54    Tool Exist  ppc64_cpu
55    Tool Exist  lscpu
56
57
58Test Teardown Execution
59    [Documentation]  Do the post-test teardown.
60
61    ${keyword_buf}=  Catenate  Stop SOL Console Logging
62    ...  \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log
63    Run Key  ${keyword_buf}
64
65    FFDC On Test Case Fail
66    Power Off Host
67    Close All Connections
68