--- /dev/null
+*** Settings ***
+Documentation Distribution testing: generate stream-dependent values.
+...
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
+...
+...
+... As newer ODL versions are released, some values evolve from previously hardcoded constants.
+... This Resource contains keywords for optaining the correct value for currently testes stream.
+Library Collections
+Resource ${CURDIR}/../CompareStream.robot
+
+*** Keywords ***
+Compose_Zip_Filename_Prefix
+ [Documentation] Return "karaf" if at least Nitrogen, else return "distribution-karaf".
+ BuiltIn.Run_Keyword_And_Return CompareStream.Set_Variable_If_At_Least_Nitrogen karaf distribution-karaf
+
+Compose_Test_Feature_Repo_Name
+ [Documentation] Return "features-test" if at least Nitrogen, else return "features-integration-test".
+ BuiltIn.Run_Keyword_And_Return CompareStream.Set_Variable_If_At_Least_Nitrogen features-test features-integration-test
*** Settings ***
Documentation Bug 4462 test suite.
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016-2017 Cisco Systems, Inc. and others. All rights reserved.
...
... This program and the accompanying materials are made available under the
... terms of the Eclipse Public License v1.0 which accompanies this distribution,
... list of features one by one. Default list is odl-integration-compatible-with-all.
Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown
Default Tags critical distribution features
+Resource ${CURDIR}/../../libraries/distribution/StreamDistro.robot
Resource ${CURDIR}/../../libraries/ClusterManagement.robot
Resource ${CURDIR}/../../libraries/SetupUtils.robot
Resource ${CURDIR}/../../libraries/SSHKeywords.robot
Install_Features_One_By_One
[Documentation] Try to install current list of features and check whether Karaf hangs on it or not (bug 4462).
SSHKeywords.Open_Connection_To_ODL_System
- ${actual_version}= BuiltIn.Evaluate '''${BUNDLEFOLDER}'''[len("distribution-karaf-"):]
- SSHLibrary.Get_File ${WORKSPACE}/${BUNDLEFOLDER}/system/org/opendaylight/integration/features-integration-test/${actual_version}/features-integration-test-${actual_version}-features.xml features.xml
- @{features}= XML.Get_Elements_Texts features.xml .feature[@name="${FEATURES_LIST_NAME}"]/feature
+ ${filename_prefix} = StreamDistro.Compose_Zip_Filename_Prefix
+ ${actual_version} = BuiltIn.Evaluate '''${BUNDLEFOLDER}'''[len("${filename_prefix}-"):]
+ ${features_test} = StreamDistro.Compose_Test_Feature_Repo_Name
+ SSHLibrary.Get_File ${WORKSPACE}/${BUNDLEFOLDER}/system/org/opendaylight/integration/${features_test}/${actual_version}/${features_test}-${actual_version}-features.xml features.xml
+ @{features} = XML.Get_Elements_Texts features.xml .feature[@name="${FEATURES_LIST_NAME}"]/feature
Collections.Log_List ${features}
KarafKeywords.Open_Controller_Karaf_Console_With_Timeout ${1} ${FEATURE_INSTALL_TIMEOUT}
: FOR ${feature} IN @{features}
*** Settings ***
Documentation Suite for testing ODL distribution zip file size.
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016-2017 Cisco Systems, Inc. and others. All rights reserved.
...
... This program and the accompanying materials are made available under the
... terms of the Eclipse Public License v1.0 which accompanies this distribution,
Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
Default Tags critical distribution size
+Resource ${CURDIR}/../../libraries/distribution/StreamDistro.robot
Resource ${CURDIR}/../../libraries/SetupUtils.robot
Resource ${CURDIR}/../../libraries/SSHKeywords.robot
*** Variables ***
-${BUNDLE_PREFIX} distribution-karaf # BUNDLEFOLDER may contain -SNAPSHOT part, which is not present in the archive name.
${BUNDLE_SUFFIX} .zip
${DISTRIBUTION_SIZE_LIMIT} 469762048 # == 7 * 64 MiB, Nexus limit is 8 * 64 MiB.
Distribution_Size
[Documentation] Run "ls" on ODL_SYSTEM, parse file size and compare to ${DISTRIBUTION_SIZE_LIMIT}.
SSHKeywords.Open_Connection_To_ODL_System
+ ${bundle_prefix} = StreamDistro.Compose_Zip_Filename_Prefix
# TODO: 'du -b' is shorter, but gives less info. Is that better than ls?
- ${ls_output} = SSHKeywords.Execute_Command_Should_Pass command=bash -c 'ls -lAn ${WORKSPACE}/${BUNDLE_PREFIX}*${BUNDLE_SUFFIX}'
+ ${ls_output} = SSHKeywords.Execute_Command_Should_Pass command=bash -c 'ls -lAn ${WORKSPACE}/${bundle_prefix}*${BUNDLE_SUFFIX}'
${size} = SSHKeywords.Execute_Command_Should_Pass command=echo '${ls_output}' | cut -d ' ' -f 5
# The following probably fails of there were multiple *.zip files listed.
BuiltIn.Should_Be_True ${size} < ${DISTRIBUTION_SIZE_LIMIT} Distribution size ${size} is not smaller than limit ${DISTRIBUTION_SIZE_LIMIT}.