]> git.droids-corp.org - dpdk.git/commitdiff
scripts: test clean build when config is changed
authorThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 30 Jun 2016 10:08:26 +0000 (12:08 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 1 Jul 2016 10:35:57 +0000 (12:35 +0200)
If there is a change in the config directory the build test
will refresh the tested build config to take into account new options.
The git working directory and the last git commit are checked for a
change in config/.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
scripts/test-build.sh

index 24c02025a2c83f7b586bf6204074e253aabe169c..5bcecfc37e2c70289aa1a55cb43217ddeca93204 100755 (executable)
@@ -130,7 +130,12 @@ reset_env ()
 
 config () # <directory> <target> <options>
 {
-       if [ ! -e $1/.config ] ; then
+       reconfig=false
+       if git rev-parse 2>&- && [ -n "$(git diff HEAD~ -- config)" ] ; then
+               echo 'Default config may have changed'
+               reconfig=true
+       fi
+       if [ ! -e $1/.config ] || $reconfig ; then
                echo "================== Configure $1"
                make T=$2 O=$1 config