Enable debug tarball on BMC

Two aspects of this change are:

   Code update:
       - Install debug tarball post code update.
       - TBD: add parameter in code update jenkins job to take user
         input.

   CT run:
       - Install debug tarball part of the __init__ setup procedure.
       - TBD: add parameter in CT jenkins job to take user input.
       - For manual test, users need to specify the debug tarball as
         an input.

Test automation code must handle respectively if it has dependencies on
debug tarball binary as part of the "Suite Setup" or "Test Setup".

Resolves openbmc/openbmc-test-automation#461

Change-Id: Idc6f976776ad57a797cff428c840c133fc41ad8a
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/code_update/update_bmc.robot b/extended/code_update/update_bmc.robot
index e211a31..0e290a2 100644
--- a/extended/code_update/update_bmc.robot
+++ b/extended/code_update/update_bmc.robot
@@ -86,6 +86,14 @@
     Run Keyword If  ${BOOT_COUNT} == ${1}
     ...  Log  Boot time not updated by kernel.  level=WARN
 
+
+Install BMC Debug Tarball
+    [Documentation]  Install the downloaded debug tarball on BMC.
+    [Tags]  Install_BMC_Debug_Tarball
+    Run Keyword If  '${DEBUG_TARBALL_PATH}' != '${EMPTY}'
+    ...  Install Debug Tarball On BMC  ${DEBUG_TARBALL_PATH}
+
+
 Test Basic BMC Performance At Ready State
     [Documentation]   Check performance of memory, CPU & file system of BMC.
     [Tags]  Test_Basic_BMC_Performance_At_Ready_State
diff --git a/lib/resource.txt b/lib/resource.txt
index 74d9e5c..247d251 100755
--- a/lib/resource.txt
+++ b/lib/resource.txt
@@ -44,6 +44,9 @@
 ${NETWORK_PORT}     80
 ${PACKET_TYPE}      tcp
 
+# BMC debug tarball parameter
+${DEBUG_TARBALL_PATH}  ${EMPTY}
+
 *** Keywords ***
 Get Inventory Schema
     [Arguments]    ${machine}
diff --git a/tests/__init__.robot b/tests/__init__.robot
index cf6a589..65d17e3 100644
--- a/tests/__init__.robot
+++ b/tests/__init__.robot
@@ -22,6 +22,9 @@
     Run Keyword And Ignore Error  Log PNOR Driver Details
     Run Keyword And Ignore Error  Log BMC Model
     Run Keyword And Ignore Error  Enable Core Dump On BMC
+    Run Keyword If  '${DEBUG_TARBALL_PATH}' != '${EMPTY}'
+    ...   Run Keyword And Ignore Error
+    ...   Install Debug Tarball On BMC  ${DEBUG_TARBALL_PATH}
 
 Log BMC Driver Details
     [Documentation]   Get BMC driver details and log.
diff --git a/tools/generate_argumentfile.sh b/tools/generate_argumentfile.sh
index f662990..1a114a3 100755
--- a/tools/generate_argumentfile.sh
+++ b/tools/generate_argumentfile.sh
@@ -21,3 +21,4 @@
 echo "--variable OS_HOST:$OS_HOST" >> $ARG_FILE
 echo "--variable OS_USERNAME:$OS_USERNAME" >> $ARG_FILE
 echo "--variable OS_PASSWORD:$OS_PASSWORD" >> $ARG_FILE
+echo "--variable DEBUG_TARBALL_PATH:$DEBUG_TARBALL_PATH" >> $ARG_FILE