Fix character limit of build_image.py and test_build_image.py
This Adds a new line break for every lines that exceeds character limit.
Tested: Unit tests all passed. End-to-end test with sstate-cache passed.
Signed-off-by: Simon-Lii <thesimonli@google.com>
Change-Id: I721165dd54b733130c53c2f28db09f2bf4f79143
diff --git a/steps/build_image.py b/steps/build_image.py
index 869a3be..079a5f4 100644
--- a/steps/build_image.py
+++ b/steps/build_image.py
@@ -16,15 +16,16 @@
def export_bb_env_passthrough_additions(self):
"""Adds GBMC_CONFIG and GBMC_VERSION to BB_ENV_PASSTHROUGH_ADDITIONS whitelist"""
- return "export BB_ENV_PASSTHROUGH_ADDITIONS=${BB_ENV_PASSTHROUGH_ADDITIONS} GBMC_CONFIG GBMC_VERSION"
+ return "export BB_ENV_PASSTHROUGH_ADDITIONS=${BB_ENV_PASSTHROUGH_ADDITIONS} " \
+ "GBMC_CONFIG GBMC_VERSION"
def run_script(self):
# command =
# """export MACHINE=machine0 && source setup machine0 && umask 002
# && export GBMC_CONFIG=dev && export GBMC_VERSION=x.y.z
- # && export BB_ENV_PASSTHROUGH_ADDITIONS=${BB_ENV_PASSTHROUGH_ADDITIONS} GBMC_CONFIG GBMC_VERSION
- # && bitbake -k obmc-phosphor-image
+ # && export BB_ENV_PASSTHROUGH_ADDITIONS=${BB_ENV_PASSTHROUGH_ADDITIONS}
+ # GBMC_CONFIG GBMC_VERSION && bitbake -k obmc-phosphor-image
# """
command = " && ".join([
self.export_machine(), self.source_setup(), self.umask(), self.export_gbmc_config(),
diff --git a/unit_tests/test_build_image.py b/unit_tests/test_build_image.py
index 2b7535d..c6c69cc 100644
--- a/unit_tests/test_build_image.py
+++ b/unit_tests/test_build_image.py
@@ -63,7 +63,8 @@
"&& umask 002 " \
"&& export GBMC_CONFIG=test " \
"&& export GBMC_VERSION=x.y.z " \
- "&& export BB_ENV_PASSTHROUGH_ADDITIONS=${BB_ENV_PASSTHROUGH_ADDITIONS} GBMC_CONFIG GBMC_VERSION " \
+ "&& export BB_ENV_PASSTHROUGH_ADDITIONS=$" \
+ "{BB_ENV_PASSTHROUGH_ADDITIONS} GBMC_CONFIG GBMC_VERSION " \
"&& bitbake -k obmc-phosphor-image"
subprocess.run.assert_called_with(["bash", "-c", command])