summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2014-02-27 13:24:16 -0800
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-03-06 13:37:42 +0200
commit61ffdda7b5321cb4332bcc40ebcc933cae23f4f3 (patch)
tree5b664aa586cfea714e9338ea21ccf3241d1a4d24
parent5c0229250b1f4c1e34405a508ee58ed91fffef35 (diff)
downloadaiaiai-61ffdda7b5321cb4332bcc40ebcc933cae23f4f3.tar.gz
Add support for choosing build targets
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>
-rwxr-xr-xaiaiai-test-patchset12
-rwxr-xr-xemail/aiaiai-email-test-patchset10
2 files changed, 17 insertions, 5 deletions
diff --git a/aiaiai-test-patchset b/aiaiai-test-patchset
index 577e987..0daa1ca 100755
--- a/aiaiai-test-patchset
+++ b/aiaiai-test-patchset
@@ -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"
diff --git a/email/aiaiai-email-test-patchset b/email/aiaiai-email-test-patchset
index 0028d3e..03d747a 100755
--- a/email/aiaiai-email-test-patchset
+++ b/email/aiaiai-email-test-patchset
@@ -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"} -- \