Change BB_ENV_EXTRAWHITE to BB_ENV_PASSTHROUGH_ADDITIONS
This changes all occurences of BB_ENV_EXTRAWHITE to
BB_ENV_PASSTHROUGH_ADDITIONS, as required by the latest yocto project
changes.
Tested: All python unit tests passed. End-to-end tests with clean build
passed.
Signed-off-by: Simon-Lii <thesimonli@google.com>
Change-Id: I9a0c725ed7158b9ee4f91826f14e6a9d2996329c
diff --git a/steps/build_image.py b/steps/build_image.py
index c2eefcf..869a3be 100644
--- a/steps/build_image.py
+++ b/steps/build_image.py
@@ -14,20 +14,20 @@
"""Sets the bitbake environment variable for GBMC_VERSION"""
return f"export GBMC_VERSION={self.firmware_version}"
- def export_bb_env_extrawhite(self):
- """Adds GBMC_CONFIG and GBMC_VERSION to BB_ENV_EXTRAWHITE whitelist"""
- return "export BB_ENV_EXTRAWHITE=${BB_ENV_EXTRAWHITE} GBMC_CONFIG GBMC_VERSION"
+ 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"
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_EXTRAWHITE=${BB_ENV_EXTRAWHITE} GBMC_CONFIG GBMC_VERSION
+ # && 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(),
- self.export_gbmc_version(), self.export_bb_env_extrawhite(), self.bitbake()])
+ self.export_gbmc_version(), self.export_bb_env_passthrough_additions(), self.bitbake()])
subprocess.run(["bash", "-c", command])
diff --git a/unit_tests/test_build_image.py b/unit_tests/test_build_image.py
index a735583..2b7535d 100644
--- a/unit_tests/test_build_image.py
+++ b/unit_tests/test_build_image.py
@@ -12,7 +12,7 @@
self.step.umask = MagicMock(return_value="")
self.step.export_gbmc_config = MagicMock(return_value="")
self.step.export_gbmc_version = MagicMock(return_value="")
- self.step.export_bb_env_extrawhite = MagicMock(return_value="")
+ self.step.export_bb_env_passthrough_additions = MagicMock(return_value="")
self.step.bitbake = MagicMock(return_value="")
subprocess.run = MagicMock()
@@ -38,9 +38,9 @@
"""Tests that export_gbmc_version is called"""
self.step.export_gbmc_version.assert_called_with()
- def test_export_bb_env_extrawhite(self):
- """Tests that export_bb_env_extrawhite is called"""
- self.step.export_bb_env_extrawhite.assert_called_with()
+ def test_export_bb_env_passthrough_additions(self):
+ """Tests that export_bb_env_passthrough_additions is called"""
+ self.step.export_bb_env_passthrough_additions.assert_called_with()
def test_bitbake(self):
"""Tests that bitbake method is called"""
@@ -63,7 +63,7 @@
"&& umask 002 " \
"&& export GBMC_CONFIG=test " \
"&& export GBMC_VERSION=x.y.z " \
- "&& export BB_ENV_EXTRAWHITE=${BB_ENV_EXTRAWHITE} 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])