]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
Add support for choosing build targets
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 27 Feb 2014 21:24:16 +0000 (13:24 -0800)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 6 Mar 2014 11:37:42 +0000 (13:37 +0200)
Since aiaiai-make-kernel has support for multiple targets, we should
extend the aiaiai-test-patchset to have a parameter which enables
selection of targets. By default, we should use the "all" target, but
enable the user to select what target they want. An example of a
different or additional target includes "namespacecheck"

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
aiaiai-test-patchset
email/aiaiai-email-test-patchset

index 577e9873532c066fdbb3cda078a2a7c344369bf9..0daa1ca3741be12d75c0ee1d59675d43e23fdaa7 100755 (executable)
@@ -77,6 +77,7 @@ Options:
                          stand-alone defconfig files instead;
   -p, --preserve         preserve all the temporary files - do not clean up;
       --bisectability    test bisectability;
+      --targets          list of make targets to build (defaults to all)
       --sparse           check with sparse while building;
       --smatch           check with smatch while building;
       --cppcheck         check with cppcheck while building;
@@ -189,7 +190,7 @@ test_configuration()
        aiaiai-make-kernel $verbose $sparse $smatch $cppcheck $coccinelle -o "$obj1" \
                --check-only "$mod_files" -j "$jobs" $arch_opt -D "$defconfig" \
                -O "$log1.stdout.log" -E "$log1.stderr.log" --keep-going \
-               ${kmake_opts:+-M "$kmake_opts"} -- "$cloned_kernel1" all
+               ${kmake_opts:+-M "$kmake_opts"} -- "$cloned_kernel1" $targets
 
        verbose "Done with non-patched kernel"
 
@@ -211,7 +212,7 @@ test_configuration()
        aiaiai-make-kernel $verbose $sparse $smatch $cppcheck $coccinelle -o "$obj2" \
                --check-only "$mod_files" -j "$jobs" $arch_opt -D "$defconfig" \
                -O "$log2.stdout.log" -E "$log2.stderr.log" \
-               ${kmake_opts:+-M "$kmake_opts"} -- "$cloned_kernel2" all
+               ${kmake_opts:+-M "$kmake_opts"} -- "$cloned_kernel2" $targets
 
        verbose "Done with patched kernel"
 
@@ -238,7 +239,7 @@ cleanup_handler()
 }
 set_cleanup_handler cleanup_handler
 
-TEMP=`getopt -n $PROG -o j:,c:,i:,w:,C:,p,Q:,K:,M:,v,h --long jobs:,commit-id:,input:,workdir:,logdir:,confdir:,preserve,bisectability,sparse,smatch,cppcheck,coccinelle,quick-fixes:,keywords:,kmake-opts:,verbose,help -- "$@"` ||
+TEMP=`getopt -n $PROG -o j:,c:,i:,w:,C:,p,Q:,K:,M:,v,h --long jobs:,commit-id:,input:,workdir:,logdir:,confdir:,preserve,bisectability,targets,sparse,smatch,cppcheck,coccinelle,quick-fixes:,keywords:,kmake-opts:,verbose,help -- "$@"` ||
        fail_usage ""
 eval set -- "$TEMP"
 
@@ -249,6 +250,7 @@ commit_id1=HEAD
 mbox=
 bisectability=
 sparse=
+targets="all"
 smatch=
 cppcheck=
 coccinelle=
@@ -295,6 +297,10 @@ while true; do
        --bisectability)
                bisectability="--bisectability"
                ;;
+       --targets)
+               targets="$2"
+               shift
+               ;;
        --sparse)
                sparse="--sparse"
                program_required "sparse" "See section 'sparse' in doc/README"
index 0028d3e68eac0c1d12486e70106453c414b7a518..03d747a846c38d604968d208a380741bba5a77e1 100755 (executable)
@@ -44,6 +44,7 @@ Options:
       --test-mode        test mode - work as usually, but do not actually
                          send replies;
       --bisectability    test bisectability;
+      --targets          list of make targets to build (defaults to all);
       --sparse           check with sparse while building;
       --smatch           check with smatch while building;
       --cppcheck         check with cppcheck;
@@ -186,7 +187,7 @@ $(cat -- $tmpdir/test-patchset.log)
 EOF
 }
 
-TEMP=`getopt -n $PROG -o i:,C:,p,v,h --long test-mode,input:,confdir:,preserve,bisectability,sparse,smatch,cppcheck,coccinelle,verbose,help -- "$@"` ||
+TEMP=`getopt -n $PROG -o i:,C:,p,v,h --long test-mode,input:,confdir:,preserve,bisectability,targets,sparse,smatch,cppcheck,coccinelle,verbose,help -- "$@"` ||
        fail_usage ""
 eval set -- "$TEMP"
 
@@ -194,6 +195,7 @@ mbox=
 confdir=
 test_mode=
 bisectability=
+targets="all"
 sparse=
 smatch=
 cppcheck=
@@ -218,6 +220,10 @@ while true; do
        --bisectability)
                bisectability="--bisectability"
                ;;
+       --targets)
+               targets="$2"
+               shift
+               ;;
        --sparse)
                sparse="--sparse"
                ;;
@@ -338,7 +344,7 @@ fi
 # Test the path (or patch-set)
 verbose "Test configs \"$pcfg_configs\" branch \"$pcfg_branch\" of \"$pcfg_path\""
 aiaiai-test-patchset $verbose $preserve \
-       $bisectability $sparse $smatch $cppcheck $coccinelle \
+       $bisectability ${targets:--targets "$targets"} $sparse $smatch $cppcheck $coccinelle \
        -i "$mbox" -j "$cfg_jobs" -c "$pcfg_branch" -w "$tmpdir" \
        ${confdir:+-C "$confdir"} \
        ${pcfg_unwanted_keywords:+-K "$pcfg_unwanted_keywords"} -- \