# aiaiai will insert it for you.
built_preamble = I have tested your changes
+# These options are probably not useful, but may help debug issues with aiaiai
+[debug]
+ # Set to (1) to disable sending reply emails when a patch is tested.
+ # This can help prevent spam while testing or debugging aiaiai.
+ disable_notifications = 0
+
+ # Set to (1) to preserve generated files instead of allowing aiaiai to
+ # cleanup after itself.
+ preserve_files = 0
+
# The "defaults" section specifies various default settings for projects. These
# values are overridden by the same values in the prj_* sections, so you may
# customize the settings per project if desired.
minutes ago from the mail archive directory;
--reap-incomplete=MIN remove all incomplete patch series older than
current time minus MIN minutes;
- --test-mode test mode - work as usually, but do not send
- replies;
-v, --verbose be verbose;
-h, --help show this text and exit.
EOF
[ -z "$verbose" ] || cat -- "$lda_tmp/mail" >&2
- if [ -z "$test_mode" ]; then
+ if [ "$cfg_disable_notifications" != "1" ]; then
mutt -x -H "$lda_tmp/mail" </dev/null
else
- verbose "Do not actually send the email - we are in test mode"
+ verbose "Email notifications have been disabled in the configuration file"
fi
}
}
set_cleanup_handler cleanup_handler
-TEMP=`getopt -n $PROG -o v,h --long test-mode,reap-archive:,reap-incomplete:,verbose,help -- "$@"` ||
+TEMP=`getopt -n $PROG -o v,h --long reap-archive:,reap-incomplete:,verbose,help -- "$@"` ||
fail_usage ""
eval set -- "$TEMP"
-test_mode=
archive_min=
incomplete_min=
verbose=
while true; do
case "$1" in
- --test-mode)
- test_mode=y
- ;;
--reap-archive)
archive_min="$(opt_check_number "$1" "$2")"
shift
# file:
#
# cfg_ownname, cfg_ownmail, cfg_adminname, cfg_adminmail, cfg_workdir,
-# cfg_max_validators, cfg_jobs, cfg_preamble, cfg_signature, cfg_built_preamble
+# cfg_max_validators, cfg_jobs, cfg_preamble, cfg_signature,
+# cfg_built_preamble, cfg_disable_notifications, cfg_preserve_files
#
# Additionally, the following variables are set:
# o cfg_ownmail_local - the local portion of the ownmail address
ini_config_get_or_die cfg_signature "$cfgfile" "global" "signature"
ini_config_get_or_die cfg_built_preamble "$cfgfile" "global" "built_preamble"
+ # Debug options
+ cfg_disable_notifications="$(ini_config_get "$cfgfile" "debug" "disable_notifications")"
+ cfg_preserve_files="$(ini_config_get "$cfgfile" "debug" "preserve_files")"
+
# Get the contents of the preamble file
cfg_preamble="$(cat "$cfg_preamble")"
# The following options all take default value from the "defaults"
# section, and hence "override" those settings. First we need to populate those.
- _parse_default_config "$cfgfile"
+ __parse_default_config "$cfgfile"
# ini_config_is_set is important here, so that defining a value as
# empty in the project section actually does define it as empty, rather
Options:
-i, --input=MBOX use the MBOX file instead of stdin;
- -p, --preserve preserve all the temporary files - do not clean up;
- --test-mode test mode - work as usually, but do not actually
- send replies;
-v, --verbose be verbose;
-h, --help show this text and exit.
EOF
exit 1
}
-preserve=
verbose=
mbox=
tmpdir=
{
rm $verbose -rf -- "$mbox" >&2
- if [ -n "$preserve" ]; then
+ if [ "$cfg_preserve_files" = "1" ]; then
verbose "Preserved tmpdir: $tmpdir"
else
[ -z "$tmpdir" ] || verbose "Removing $tmpdir";
[ -z "$verbose" ] || cat -- "$tmpdir/mail" >&2
- if [ -z "$test_mode" ]; then
+ if [ "$cfg_disable_notifications" != "1" ]; then
mutt -x -H "$tmpdir/mail" </dev/null
else
- verbose "Do not actually send the email - we are in test mode"
+ verbose "Email nofications have been disabled in the configuration file"
fi
}
EOF
}
-TEMP=`getopt -n $PROG -o i:,C:,p,v,h --long test-mode,input:,preserve,verbose,help -- "$@"` ||
+TEMP=`getopt -n $PROG -o i:,C:,p,v,h --long input:,verbose,help -- "$@"` ||
fail_usage ""
eval set -- "$TEMP"
mbox=
-test_mode=
while true; do
case "$1" in
mbox="$(opt_check_read "$1" "$2")"
shift
;;
- -p|--preserve)
- preserve="--preserve"
- ;;
- --test-mode)
- test_mode=y
- ;;
-v|--verbose) verbose=-v
;;
-h|--help)
# Test the path (or patch-set)
verbose "Test configs \"$pcfg_configs\" branch \"$pcfg_branch\" of \"$pcfg_path\""
-aiaiai-test-patchset $verbose $preserve \
+aiaiai-test-patchset $verbose ${cfg_preserve_files:+--preserve} \
${pcfg_targets:+--targets "$pcfg_targets"} $bisectability $sparse $smatch $cppcheck $coccinelle \
-i "$mbox" -j "$cfg_jobs" -c "$pcfg_branch" -w "$tmpdir" \
${pcfg_defconfigdir:+-C "$pcfg_defconfigdir"} \