From a1b215cf2a52945747a1db3a6f5848b73de2eb30 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Thu, 21 Jul 2022 08:08:32 -0700 Subject: [PATCH] Remove leading whitespace from dump-variables-rbc results For some reason, some internal products were failing the quick rbc ci check purely because of indentation differences in the variable dump file. That file has a lot of wonky leading indentation due to the foreaches and line breaks in the function implementation that I couldn't figure out how to remove. Instead, use a sed command to remove leading spaces after writing the file. Bug: 239453560 Test: build/bazel/ci/rbc_dashboard.py --quick on a new internal-only product Change-Id: I4b34d8e0b5dbbfcbb9ed35345d216ca11a5a1198 --- core/envsetup.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/envsetup.mk b/core/envsetup.mk index d116aaf164..fc4afd915e 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -323,7 +323,9 @@ endif # likely to be relevant to the product or board configuration. # Soong config variables are dumped as $(call soong_config_set) calls # instead of the raw variable values, because mk2rbc can't read the -# raw ones. +# raw ones. There is a final sed command on the output file to +# remove leading spaces because I couldn't figure out how to remove +# them in pure make code. define dump-variables-rbc $(eval _dump_variables_rbc_excluded := \ BUILD_NUMBER \ @@ -345,6 +347,7 @@ $(v) := $(strip $($(v)))$(newline))\ $(foreach ns,$(sort $(SOONG_CONFIG_NAMESPACES)),\ $(foreach v,$(sort $(SOONG_CONFIG_$(ns))),\ $$(call soong_config_set,$(ns),$(v),$(SOONG_CONFIG_$(ns)_$(v)))$(newline)))) +$(shell sed -i "s/^ *//g" $(1)) endef # Read the product specs so we can get TARGET_DEVICE and other