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        ../syslib/utils_os.robot
12
13Suite Setup      Run Keyword  Start SOL Console Logging
14Test Setup       Test Setup Execution
15Test Teardown    Test Teardown Execution
16
17
18*** Test Cases ***
19
20Processor Speed Check
21    [Documentation]  Check processor speed.
22    [Tags]  Processor_Speed_Check
23
24    ${actual_min_freq}=  Get CPU Min Frequency
25    ${min_freq_designated_lower_limit}=  Get CPU Min Frequency Limit
26
27    Printn
28    Rpvars  actual_min_freq  min_freq_designated_lower_limit
29
30    ${err_msg}=  Catenate  Reported CPU frequency below designated limit.
31    Should Be True  ${actual_min_freq} >= ${min_freq_designated_lower_limit}
32    ...  msg=${err_msg}
33
34    ${actual_max_freq}=  Get CPU Max Frequency
35    ${max_freq_designated_limit}=  Get CPU Max Frequency Limit
36
37    Rpvars  actual_max_freq  max_freq_designated_limit
38
39    ${err_msg}=  Catenate  Reported CPU frequency above designated limit.
40    Should Be True  ${actual_max_freq} <= ${max_freq_designated_limit}
41    ...  msg=${err_msg}
42
43    Error Logs Should Not Exist
44
45
46*** Keywords ***
47
48Test Setup Execution
49    [Documentation]  Do the pre-test setup.
50
51    REST Power On  stack_mode=skip
52    Delete All Error Logs
53    Tool Exist  ppc64_cpu
54    Tool Exist  lscpu
55
56
57Test Teardown Execution
58    [Documentation]  Do the post-test teardown.
59
60    ${keyword_buf}=  Catenate  Stop SOL Console Logging
61    ...  \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log
62    Run Key  ${keyword_buf}
63
64    FFDC On Test Case Fail
65    Power Off Host
66    Close All Connections
67