Felix Singer has uploaded this change for review.

View Change

[WIP] test_build.sh: Rework programmer selection using Meson

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I9f41ce2ff219c70c3c05a90134291b01a084c859
---
M test_build.sh
1 file changed, 27 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/68/68068/1
diff --git a/test_build.sh b/test_build.sh
index d2ff129..f89827c 100755
--- a/test_build.sh
+++ b/test_build.sh
@@ -44,6 +44,22 @@
}


+generate_meson_programmer_list () {
+ tmp_dir="tmp"
+ meson_logfile="${tmp_dir}/meson-logs/meson-log.txt"
+
+ set +e
+ meson ${tmp_dir} -Dprogrammer=unknown_programmer > /dev/null
+ set -e
+
+ programmer_list=$(cat ${meson_logfile} | tail -n 1 | sed 's/^.*auto/auto/' | sed 's/\,//g' | sed 's/\"//g')
+
+ rm -rf ${tmp_dir}
+
+ echo ${programmer_list}
+}
+
+
build_meson () {
build_dir=out
meson_opts="-Dtests=enabled"
@@ -51,7 +67,7 @@

rm -rf ${build_dir}

- for programmer in ${meson_programmer_opts}; do
+ for programmer in $(generate_meson_programmer_list); do
programmer_dir="${build_dir}/${programmer}"

# In case of clang analyzer we don't want to run it on

To view, visit change 68068. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I9f41ce2ff219c70c3c05a90134291b01a084c859
Gerrit-Change-Number: 68068
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <felixsinger@posteo.net>
Gerrit-MessageType: newchange