aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-03-12 22:47:49 -0700
committerTom Rini <trini@konsulko.com>2022-04-07 16:50:53 -0400
commit6910dbe3413e684bff9a194945df60345ecbc623 (patch)
tree86204244c902ae70775c787d23427da8961f77d1 /scripts
parent754a722d1b9572aad7900ad2a8e58f2f8a7cd2cc (diff)
downloadu-boot-6910dbe3413e684bff9a194945df60345ecbc623.zip
u-boot-6910dbe3413e684bff9a194945df60345ecbc623.tar.gz
u-boot-6910dbe3413e684bff9a194945df60345ecbc623.tar.bz2
env: Allow text-env tests to run with awk
At present the tests assume that gawk is being used. Adjust the tests so that the names are inserted in alphabetical order, so that awk is happy. Also use PROCINFO to make gawk output in alphabetical order. This is not ideal, since it changes the env-car ordering from what the user provided, but it may be acceptable. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Fixes: https://source.denx.de/u-boot/u-boot/-/issues/10
Diffstat (limited to 'scripts')
-rw-r--r--scripts/env2string.awk5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/env2string.awk b/scripts/env2string.awk
index 1bfe9ed..de470a4 100644
--- a/scripts/env2string.awk
+++ b/scripts/env2string.awk
@@ -81,7 +81,10 @@ END {
if (do_output) {
printf("%s", "#define CONFIG_EXTRA_ENV_TEXT \"")
- # Print out all the variables
+ # Print out all the variables by alphabetic order, if using
+ # gawk. This allows test_env_test.py to work on both awk (where
+ # this next line does nothing)
+ PROCINFO["sorted_in"] = "@ind_str_asc"
for (var in vars) {
env = vars[var]
print var "=" vars[var] "\\0"