diff options
author | Alexey Neyman <stilor@att.net> | 2019-02-06 00:20:11 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2019-02-06 00:20:11 -0800 |
commit | cad2a775dc96e9fb2b435f154a8fa29ed5427ba0 (patch) | |
tree | fae4f20a9b4c452e734413f16003ac41ceab814f /testing/upgrade/run.sh | |
parent | 27f0c8b838758d7ad0ef11322a90ec150c2a4bd6 (diff) | |
download | crosstool-ng-cad2a775dc96e9fb2b435f154a8fa29ed5427ba0.tar.gz crosstool-ng-cad2a775dc96e9fb2b435f154a8fa29ed5427ba0.tar.bz2 crosstool-ng-cad2a775dc96e9fb2b435f154a8fa29ed5427ba0.zip |
Add test if kconfig file version needs to be bumped
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'testing/upgrade/run.sh')
-rwxr-xr-x | testing/upgrade/run.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/upgrade/run.sh b/testing/upgrade/run.sh index 337eeff2..98da8ae7 100755 --- a/testing/upgrade/run.sh +++ b/testing/upgrade/run.sh @@ -107,6 +107,34 @@ run_sample() } mkdir -p logs + +# Non-sample-specific tests + +# Verify that no options have been retired since the stored known configuration. +current_tc="options-set" +exec {LOG}>"logs/global.log" +curver=`sed -n 's,export CT_CONFIG_VERSION_CURRENT=,,p' ${CTNG}` +if [ -z "${curver}" ]; then + echo "Cannot determine config version" >&${LOG} + fail +elif [ ! -r "kconfig-list/${curver}" ]; then + echo "No saved kconfig data for version ${curver}" >&${LOG} + fail +else + grep -hr '^\(menu\)\?config ' "${dirs[@]}" ../../config | \ + grep -v '^Binary ' | \ + sed 's,^.* ,CT_,' | LANG=C sort | uniq > logs/current-kconfig-list + diff -U 10000 "kconfig-list/${curver}" logs/current-kconfig-list | \ + grep '^-CT_' > logs/current-kconfig-retired || true + nretired=`wc -l logs/current-kconfig-retired | sed 's/ .*//'` + echo "${nretired} kconfig options have been removed without bumping the config version" >&${LOG} + if [ "${nretired}" != "0" ]; then + fail + fi +fi +finish +exec {LOG}>&- + for i in samples/*.config; do current_tc=${i#samples/} current_tc=${current_tc%.config} |