X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FNexusKeywords.robot;h=850711e5d0c9066e2a05298459b1da230320fd58;hb=9f074b03bf384dcb18179e76a1a1fe642a47900c;hp=f93f707f406a42d62742d460abe2b0991ea1f6b6;hpb=49f6c22e0f7d5104764866ddb3912c82b6b32e52;p=integration%2Ftest.git diff --git a/csit/libraries/NexusKeywords.robot b/csit/libraries/NexusKeywords.robot index f93f707f40..850711e5d0 100644 --- a/csit/libraries/NexusKeywords.robot +++ b/csit/libraries/NexusKeywords.robot @@ -102,3 +102,20 @@ Deploy_Test_Tool ${name_suffix}= BuiltIn.Set_Variable -${suffix}.jar ${filename}= Deploy_Artifact ${component} ${artifact} ${name_prefix} ${name_suffix} [Return] ${filename} + +Compose_Base_Java_Command + [Arguments] ${openjdk}=${JDKVERSION} + [Documentation] Return string suitable for launching Java programs over SSHLibrary, depending on JRE version needed. + ... Not directly related to nexus, but different versioned Java artifacts may need this. + BuiltIn.Return_From_Keyword_If """${openjdk}""" == "openjdk8" /usr/lib/jvm/java-1.8.0/bin/java + BuiltIn.Return_From_Keyword_If """${openjdk}""" == "openjdk7" /usr/lib/jvm/java-1.7.0/bin/java + BuiltIn.Return_From_Keyword java + +Compose_Full_Java_Command + [Arguments] ${options} ${openjdk}=${JDKVERSION} + [Documentation] Return full Bash command to run Java with given options. + ... The options may include JVM options, application command line arguments, Bash redirects and other constructs. + ${base_command} = Compose_Base_Java_Command openjdk=${openjdk} + ${full_command} = BuiltIn.Set_Variable ${base_command} ${options} + BuiltIn.Log ${full_command} + [Return] ${full_command}