containing the text for end-users to refer instead. Just like
email.preamble refers the file, which contains the preamble. This is more
flexible and consistent.
- * Move command-line options of 'aiaiai-email-*' scripts to the configuration
- file. This should make it simpler for users to configure the whole thing
- when all the knobs are in one place. Just make each script to parse the
- config file and pick own configuration from there. Namely, most of
- the 'aiaiai-email-dispatcher', 'aiaiai-email-testpatchset', and
- 'aiaiai-email-lda' options have to go away.
* Eventually make non-email scripts (aiaiai-test-patchset) also
support the config file. This could be an alternative to specifying
everythig via options. E.g., would could run
# "make" command. For example, W=2 KALLSYMS_EXTRA_PASS=1.
kmake_opts =
+ # List of targets (space seperated) for which to run a kernel make.
+ # Leaving this empty will default to "all" as the only target. However,
+ # the "all" target is not implicit so you should explicitly have it in
+ # the list if you want it to run.
+ targets = all namespacecheck
+
+ # Path to the directory containing the deconfig files (those specified
+ # for each project). Leave empty to use the kernel tree default
+ # configs.
+ defconfigdir =
+
+ # Whether to test bisectability between patches in a series (1), or
+ # only to check results of the squished patch-set (0)
+ bisectability = 0
+
+ # Set to (1) to enable sparse during kernel builds
+ sparse = 1
+
+ # Set to (1) to enable smatch during kernel builds
+ smatch = 0
+
+ # Set to (1) to enable cppcheck during kernel builds
+ cppcheck = 0
+
+ # Set to (1) to enable coccinelle scripts during kernel builds
+ coccinelle = 1
+
+
# The e-mail front-end may operate on several project. Each project has its
# own kernel tree, kernel configuration, and some other settings. These are
# configured in per-project sections. Section names have to start with "prj_"
# file:
#
# __dcfg_configs, __dcfg_branch, __dcfg_always_cc, __dcfg_reply_to_all,
-# __dcfg_accept_notify, __dcfg_unwanted_keywords, __dcfg_kmake_opts
+# __dcfg_accept_notify, __dcfg_unwanted_keywords, __dcfg_kmake_opts,
+# __dcfg_targets, __dcfg_defconfigdir, __dcfg_bisectability, __dcfg_sparse,
+# __dcfg_smatch, __dcfg_cppcheck, __dcfg_coccinelle
#
# It is expected that this is used internally by the parse_prj_config and
# should not normally be called outside of this file.
__dcfg_accept_notify="$(ini_config_get "$cfgfile" "defaults" "accept_notify")"
__dcfg_unwanted_keywords="$(ini_config_get "$cfgfile" "defaults" "unwanted_keywords")"
__dcfg_kmake_opts="$(ini_config_get "$cfgfile" "defaults" "kmake_opts")"
+ __dcfg_targets="$(ini_config_get "$cfgfile" "defaults" "targets")"
+ __dcfg_defconfigdir="$(ini_config_get "$cfgfile" "defaults" "defconfigdir")"
+ __dcfg_bisectability="$(ini_config_get "$cfgfile" "defaults" "bisectability")"
+ __dcfg_sparse="$(ini_config_get "$cfgfile" "defaults" "sparse")"
+ __dcfg_smatch="$(ini_config_get "$cfgfile" "defaults" "smatch")"
+ __dcfg_cppcheck="$(ini_config_get "$cfgfile" "defaults" "cppcheck")"
+ __dcfg_coccinelle="$(ini_config_get "$cfgfile" "defaults" "coccinelle")"
}
# Similar to "parse_config", but parses a project configuration section. If the
# The following variables are defined, but receive default values from the
# [defaults] section, if they are not specified in the project section:
#
-# pcfg_configs, pcfg_branch, pcfg_reply_to_all, pcfg_accept_notify,
-# pcfg_always_cc, pcfg_unwanted_keywords, and pcfg_kmake_opts.
+# pcfg_configs, pcfg_branch, pcfg_always_cc, pcfg_reply_to_all,
+# pcfg_accept_notify, pcfg_unwanted_keywords, pcfg_kmake_opts, pcfg_targets,
+# pcfg_defconfigdir, pcfg_bisectability, pcfg_sparse, pcfg_smatch,
+# pcfg_cppcheck, pcfg_coccinelle
#
# If the project is not found, this function only defined an empty "pcfg_name"
# variable.
ini_config_is_set "$cfgfile" "prj_$prj" "unwanted_keywords" || pcfg_unwanted_keywords="$__dcfg_unwanted_keywords"
pcfg_kmake_opts="$(ini_config_get "$cfgfile" "prj_$prj" "kmake_opts")"
ini_config_is_set "$cfgfile" "prj_$prj" "kmake_opts" || pcfg_kmake_opts="$__dcfg_kmake_opts"
+ pcfg_targets="$(ini_config_get "$cfgfile" "prj_$prj" "targets")"
+ ini_config_is_set "$cfgfile" "prj_$prj" "targets" || pcfg_targets="$__dcfg_targets"
+ pcfg_defconfigdir="$(ini_config_get "$cfgfile" "prj_$prj" "defconfigdir")"
+ ini_config_is_set "$cfgfile" "prj_$prj" "defconfigdir" || pcfg_defconfigdir="$__dcfg_defconfigdir"
+ pcfg_bisectability="$(ini_config_get "$cfgfile" "prj_$prj" "bisectability")"
+ ini_config_is_set "$cfgfile" "prj_$prj" "bisectability" || pcfg_bisectability="$__dcfg_bisectability"
+ pcfg_sparse="$(ini_config_get "$cfgfile" "prj_$prj" "sparse")"
+ ini_config_is_set "$cfgfile" "prj_$prj" "sparse" || pcfg_sparse="$__dcfg_sparse"
+ pcfg_smatch="$(ini_config_get "$cfgfile" "prj_$prj" "smatch")"
+ ini_config_is_set "$cfgfile" "prj_$prj" "smatch" || pcfg_smatch="$__dcfg_smatch"
+ pcfg_cppcheck="$(ini_config_get "$cfgfile" "prj_$prj" "cppcheck")"
+ ini_config_is_set "$cfgfile" "prj_$prj" "cppcheck" || pcfg_cppcheck="$__dcfg_cppcheck"
+ pcfg_coccinelle="$(ini_config_get "$cfgfile" "prj_$prj" "coccinelle")"
+ ini_config_is_set "$cfgfile" "prj_$prj" "coccinelle" || pcfg_coccinelle="$__dcfg_coccinelle"
}
# Compose (but not send) e-mail reply. This function assumes that the following
Options:
-i, --input=MBOX use the MBOX file instead of stdin;
- -C, --confdir=CDIR path to the directory containing the defconfig files
- (those you specify in the config file); by default the
- defconfig files are assumed to be part of the
- <kernel-tree>; this option makes it possible to use
- stand-alone defconfig files instead;
-p, --preserve preserve all the temporary files - do not clean up;
--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;
- --coccinelle check with coccinelle;
-v, --verbose be verbose;
-h, --help show this text and exit.
EOF
EOF
}
-TEMP=`getopt -n $PROG -o i:,C:,p,v,h --long test-mode,input:,confdir:,preserve,bisectability,targets,sparse,smatch,cppcheck,coccinelle,verbose,help -- "$@"` ||
+TEMP=`getopt -n $PROG -o i:,C:,p,v,h --long test-mode,input:,preserve,verbose,help -- "$@"` ||
fail_usage ""
eval set -- "$TEMP"
mbox=
-confdir=
test_mode=
-bisectability=
-targets="all"
-sparse=
-smatch=
-cppcheck=
-coccinelle=
while true; do
case "$1" in
mbox="$(opt_check_read "$1" "$2")"
shift
;;
- -C|--confdir)
- confdir="$(opt_check_dir "$1" "$2")"
- shift
- ;;
-p|--preserve)
preserve="--preserve"
;;
--test-mode)
test_mode=y
;;
- --bisectability)
- bisectability="--bisectability"
- ;;
- --targets)
- targets="$2"
- shift
- ;;
- --sparse)
- sparse="--sparse"
- ;;
- --smatch)
- smatch="--smatch"
- ;;
- --cppcheck)
- cppcheck="--cppcheck"
- ;;
- --coccinelle)
- coccinelle="--coccinelle"
- ;;
-v|--verbose) verbose=-v
;;
-h|--help)
error_project_not_found
fi
+bisectability=
+sparse=
+smatch=
+cppcheck=
+coccinelle=
+[ "$pcfg_bisectability" != "1" ] || bisectablity="--bisectability"
+[ "$pcfg_sparse" != "1" ] || sparse="--sparse"
+[ "$pcfg_smatch" != "1" ] || smatch="--smatch"
+[ "$pcfg_cppcheck" != "1" ] || cppcheck="--cppcheck"
+[ "$pcfg_coccinelle" != "1" ] || coccinelle="--coccinelle"
+
# Create the Cc list for replies that we'll be sending
if [ "$pcfg_reply_to_all" = "1" ]; then
# All the patch recipients will be CCed
# Test the path (or patch-set)
verbose "Test configs \"$pcfg_configs\" branch \"$pcfg_branch\" of \"$pcfg_path\""
aiaiai-test-patchset $verbose $preserve \
- $bisectability ${targets:--targets "$targets"} $sparse $smatch $cppcheck $coccinelle \
+ ${pcfg_targets:--targets "$pcfg_targets"} $bisectability $sparse $smatch $cppcheck $coccinelle \
-i "$mbox" -j "$cfg_jobs" -c "$pcfg_branch" -w "$tmpdir" \
- ${confdir:+-C "$confdir"} \
+ ${pcfg_defconfigdir:+-C "$pcfg_defconfigdir"} \
${pcfg_unwanted_keywords:+-K "$pcfg_unwanted_keywords"} -- \
${pcfg_kmake_opts:+-M "$pcfg_kmake_opts"} \
"$pcfg_path" "$pcfg_configs" > "$tmpdir/test-patchset.log" ||