Add 'silicon' to the list of variables used for release version comparison 69/95069/3
authorOleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Mon, 8 Feb 2021 15:11:47 +0000 (17:11 +0200)
committerOleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Mon, 8 Feb 2021 16:23:03 +0000 (18:23 +0200)
This adding functionality to limit test runs for silicon and later
releases.

Change-Id: I3e62d91f830270013059d9dbf76658b7ce2db6f0
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
csit/libraries/CompareStream.robot

index 28de63f90b373d176021eeeb40b7f1e9f4f0261d..cd1bfd066834dbcf1d6818d1250b26c5ff5d58f2 100644 (file)
@@ -69,6 +69,11 @@ Set_Variable_If_At_Least_Aluminium
     [Documentation]    Compare aluminium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is atleast aluminium, return ${value_if_false} otherwise.
     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    aluminium    ${value_if_true}    ${value_if_false}
 
+Set_Variable_If_At_Least_Silicon
+    [Arguments]    ${value_if_true}    ${value_if_false}
+    [Documentation]    Compare silicon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is atleast silicon, return ${value_if_false} otherwise.
+    BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    silicon    ${value_if_true}    ${value_if_false}
+
 Set_Variable_If_At_Most_Carbon
     [Arguments]    ${value_if_true}    ${value_if_false}
     [Documentation]    Compare carbon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most carbon,
@@ -259,6 +264,12 @@ Run_Keyword_If_At_Least_Aluminium
     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    aluminium    ${kw_name}    @{varargs}    &{kwargs}
 
+Run_Keyword_If_At_Least_Silicon
+    [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
+    [Documentation]    Compare silicon to ${ODL_STREAM} and in case ${ODL_STREAM} is at least silicon,
+    ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
+    BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    silicon    ${kw_name}    @{varargs}    &{kwargs}
+
 Run_Keyword_If_At_Most_Carbon
     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
     [Documentation]    Compare carbon to ${ODL_STREAM} and in case ${ODL_STREAM} is at most carbon,
@@ -396,3 +407,9 @@ Run_Keyword_If_Less_Than_Magnesium
     [Documentation]    Compare magnesium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than magnesium,
     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    magnesium    ${kw_name}    @{varargs}    &{kwargs}
+
+Run_Keyword_If_Less_Than_Silicon
+    [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
+    [Documentation]    Compare silicon to ${ODL_STREAM} and in case ${ODL_STREAM} is less than silicon,
+    ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
+    BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    silicon    ${kw_name}    @{varargs}    &{kwargs}