bgp prefixcount suite with nonreplicated bgp_rib
[integration/test.git] / csit / libraries / NexusKeywords.robot
index 27f15ea2b51909e1857e99e90eb5a1111e1b1539..5f44b5f956dcb8ff02d56eaa48c137b948e8fe16 100644 (file)
@@ -17,7 +17,7 @@ Documentation     Nexus repository access keywords, and supporting Java and Mave
 Library           OperatingSystem
 Library           SSHLibrary
 Library           String
-Resource          SSHKeywords.robot
+Resource          ${CURDIR}/SSHKeywords.robot
 
 *** Variables ***
 ${JDKVERSION}     None
@@ -28,7 +28,7 @@ ${JAVA_8_HOME_UBUNTU}    /usr/lib/jvm/java-8-openjdk-amd64
 ${JAVA_OPTIONS}    -Xmx2560m    # Note that '-Xmx=3g' is wrong syntax. Also 3GB heap may not fit in 4GB RAM.
 ${JAVA_7_OPTIONS}    -Xmx2048m -XX:MaxPermSize=512m
 ${MAVEN_DEFAULT_OUTPUT_FILENAME}    default_maven.log
-${MAVEN_OPTIONS}     -Pq -Djenkins
+${MAVEN_OPTIONS}    -Pq -Djenkins
 ${MAVEN_REPOSITORY_PATH}    /tmp/r
 ${MAVEN_SETTINGS_URL}    https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml
 ${MAVEN_VERSION}    3.3.9
@@ -71,7 +71,7 @@ NexusKeywords__Detect_Version_To_Pull
     SSHKeywords.Open_Connection_To_ODL_System
     ${version}    ${result} =    SSHLibrary.Execute_Command    sh search.sh ${WORKSPACE}/${BUNDLEFOLDER}/system ${itemlist}    return_rc=True
     SSHLibrary.Close_Connection
-    Restore Current SSH Connection From Index    ${current_ssh_connection.index}
+    SSHKeywords.Restore Current SSH Connection From Index    ${current_ssh_connection.index}
     BuiltIn.Log    ${version}
     BuiltIn.Run_Keyword_If    ${result}!=0    BuiltIn.Fail    Component "${component}" not found, cannot locate test tool
     ${version}    ${location} =    String.Split_String    ${version}    max_split=1
@@ -91,8 +91,8 @@ Deploy_Artifact
     ${version}    ${location} =    NexusKeywords__Detect_Version_To_Pull    ${component}
     # TODO: Use RequestsLibrary and String instead of curl and bash utilities?
     ${url} =    BuiltIn.Set_Variable    ${urlbase}/${location}/${artifact}/${version}
-    ${namepart} =    SSHLibrary.Execute_Command    curl -L ${url}/maven-metadata.xml | grep value | head -n 1 | cut -d '>' -f 2 | cut -d '<' -f 1
-    BuiltIn.Log    ${namepart}
+    ${metadata}=    SSHKeywords.Execute_Command_Should_Pass    curl -L ${url}/maven-metadata.xml
+    ${namepart}=    SSHKeywords.Execute_Command_Should_Pass    echo "${metadata}" | grep value | head -n 1 | cut -d '>' -f 2 | cut -d '<' -f 1    stderr_must_be_empty=${True}
     ${length} =    BuiltIn.Get_Length    ${namepart}
     ${namepart} =    BuiltIn.Set_Variable_If    ${length} == 0    ${version}    ${namepart}
     ${filename} =    BuiltIn.Set_Variable    ${name_prefix}${namepart}${name_suffix}