Add a possibility to set PLATFORM_ARCH_TYPE with an environment variable
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Change-Id: I364335d4cec9d258354bd3f52e75f452886dc4db
diff --git a/lib/openbmc_ffdc_list.py b/lib/openbmc_ffdc_list.py
index ad64990..aabf33e 100755
--- a/lib/openbmc_ffdc_list.py
+++ b/lib/openbmc_ffdc_list.py
@@ -5,6 +5,8 @@
# commands and files to be collected as a part
# of the test case failure.
"""
+import os
+
from robot.libraries.BuiltIn import BuiltIn
# -------------------
@@ -157,7 +159,8 @@
},
}
-platform_arch_type = BuiltIn().get_variable_value("${PLATFORM_ARCH_TYPE}", default="power")
+platform_arch_type = os.environ.get('PLATFORM_ARCH_TYPE', '') or \
+ BuiltIn().get_variable_value("${PLATFORM_ARCH_TYPE}", default="power")
# Filter the logs based on platform type.
if platform_arch_type == "x86":
del FFDC_BMC_FILE['BMC FILES']['PEL_logs_list.json']