# Similar to "parse_config", but parses a project configuration section. If the
# project is found, the following variables are defined:
#
-# cfg_name. cfg_description, cfg_path, cfg_configs, cfg_branch,
-# cfg_reply_to_all, # cfg_accept_notify, cfg_always_cc, cfg_unwanted_keywords,
-# and cfg_kmake_opts.
+# cfg_name. pcfg_description, pcfg_path, pcfg_configs, pcfg_branch,
+# pcfg_reply_to_all, pcfg_accept_notify, pcfg_always_cc,
+# pcfg_unwanted_keywords, and pcfg_kmake_opts.
#
-# If the project is not found, this function only defined an empty "cfg_name"
+# If the project is not found, this function only defined an empty "pcfg_name"
# variable.
#
# Usage: parse_prj_config <cfgfile> <prj>
local cfgfile="$1"; shift
local prj="$1"; shift
- cfg_name="$(ini_config_get "$cfgfile" "prj_$prj" "name")"
- [ -n "$cfg_name" ] || return 0
+ pcfg_name="$(ini_config_get "$cfgfile" "prj_$prj" "name")"
+ [ -n "$pcfg_name" ] || return 0
- ini_config_get_or_die cfg_description "$cfgfile" "prj_$prj" "description"
- ini_config_get_or_die cfg_path "$cfgfile" "prj_$prj" "path"
- ini_config_get_or_die cfg_configs "$cfgfile" "prj_$prj" "configs"
- ini_config_get_or_die cfg_branch "$cfgfile" "prj_$prj" "branch"
- ini_config_get_or_die cfg_reply_to_all "$cfgfile" "prj_$prj" "reply_to_all"
- ini_config_get_or_die cfg_accept_notify "$cfgfile" "prj_$prj" "accept_notify"
+ ini_config_get_or_die pcfg_description "$cfgfile" "prj_$prj" "description"
+ ini_config_get_or_die pcfg_path "$cfgfile" "prj_$prj" "path"
+ ini_config_get_or_die pcfg_configs "$cfgfile" "prj_$prj" "configs"
+ ini_config_get_or_die pcfg_branch "$cfgfile" "prj_$prj" "branch"
+ ini_config_get_or_die pcfg_reply_to_all "$cfgfile" "prj_$prj" "reply_to_all"
+ ini_config_get_or_die pcfg_accept_notify "$cfgfile" "prj_$prj" "accept_notify"
- cfg_always_cc="$(ini_config_get "$cfgfile" "prj_$prj" "always_cc")"
- cfg_unwanted_keywords="$(ini_config_get "$cfgfile" ""prj_$prj"" "unwanted_keywords")"
- cfg_kmake_opts="$(ini_config_get "$cfgfile" "prj_$prj" "kmake_opts")"
+ pcfg_always_cc="$(ini_config_get "$cfgfile" "prj_$prj" "always_cc")"
+ pcfg_unwanted_keywords="$(ini_config_get "$cfgfile" ""prj_$prj"" "unwanted_keywords")"
+ pcfg_kmake_opts="$(ini_config_get "$cfgfile" "prj_$prj" "kmake_opts")"
}
# Compose (but not send) e-mail reply. This function assumes that the following
$(fetch_header_per_patch "Subject" < "$mbox" | sort)
-Project: $cfg_name ($cfg_description)
+Project: $pcfg_name ($pcfg_description)
-Configurations: $cfg_configs
+Configurations: $pcfg_configs
$(cat -- $tmpdir/test-patchset.log)
EOF
parse_prj_config "$cfgfile" "$prj"
# Check if we have this project in our config file
-if [ -z "$cfg_name" ]; then
+if [ -z "$pcfg_name" ]; then
error_project_not_found
fi
# Merge the "To" and "Cc" addresses
to="$(merge_addresses "$to" "$cc")"
-if [ "$cfg_reply_to_all" != "1" ]; then
+if [ "$pcfg_reply_to_all" != "1" ]; then
to=
else
# Strip own address
fi
# Notify the sender that the patches have been accepted
-if [ "$cfg_accept_notify" = "1" ]; then
+if [ "$pcfg_accept_notify" = "1" ]; then
verbose "Sending \"accepted\" e-mail"
send_accepted_email
fi
# Test the path (or patch-set)
-verbose "Test configs \"$cfg_configs\" branch \"$cfg_branch\" of \"$cfg_path\""
-aiaiai-test-patchset $verbose $preserve $bisectability $sparse $smatch $cppcheck $coccinelle \
- -i "$mbox" -j "$cfg_jobs" -c "$cfg_branch" -w "$tmpdir" \
+verbose "Test configs \"$pcfg_configs\" branch \"$pcfg_branch\" of \"$pcfg_path\""
+aiaiai-test-patchset $verbose $preserve \
+ $bisectability $sparse $smatch $cppcheck $coccinelle \
+ -i "$mbox" -j "$cfg_jobs" -c "$pcfg_branch" -w "$tmpdir" \
${confdir:+-C "$confdir"} \
- ${cfg_unwanted_keywords:+-K "$cfg_unwanted_keywords"} -- \
- ${cfg_kmake_opts:+-M "$cfg_kmake_opts"} \
- "$cfg_path" "$cfg_configs" > "$tmpdir/test-patchset.log" ||
+ ${pcfg_unwanted_keywords:+-K "$pcfg_unwanted_keywords"} -- \
+ ${pcfg_kmake_opts:+-M "$pcfg_kmake_opts"} \
+ "$pcfg_path" "$pcfg_configs" > "$tmpdir/test-patchset.log" ||
{
verbose "aiaiai-test-patchset failed"
error_test_patchset_failed