]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
aiaiai-email: move -J bigjobs into configuration file
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 7 Mar 2014 01:21:31 +0000 (17:21 -0800)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 10 Mar 2014 15:03:35 +0000 (17:03 +0200)
This modifies aiaiai-email-dispatcher to use the configuration file
instead of the command line for the bigjobs parameter.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
doc/email/example-aiaiai.cfg
email/aiaiai-email-dispatcher
email/aiaiai-email-sh-functions

index 9e631608dc3f6750b8784c918b08a15e6c4043d9..f94b4958f14ce502c4ce8fdce3e15e6ffe79fa26 100644 (file)
        # compiling the kernel, storing temporary files, etc.
        workdir = /home/aiaiai/work/aiaiai/workdir
 
+       # The maximum number of validators to run in parallel. This is
+       # different than the jobs variable, which controls how many threads to
+       # run for the make program. This can be used to allow concurrent
+       # validation of different patch series.
+       max_validators = 1
+
        # How many parallel processes should be used for validating a patch
        # or patch-set. This parameter simply translates to the "-j" option
        # of the "make" program. Note, this parameter is not about how many
index 72e3222d259aa04498338154fe0317182e5532f9..d31e88ebb2265c0854888668b2cd28f903f5cc50 100755 (executable)
@@ -12,6 +12,7 @@ echo $PATH
 . shell-args
 . shell-signal
 . aiaiai-sh-functions
+. aiaiai-email-sh-functions
 
 PROG="${0##*/}"
 message_time="yes"
@@ -37,8 +38,6 @@ for general configuration of aiaiai-email-test-patchset.
 <cfgfile.ini>      - aiaiai-email-test-patchset's configuration file
 
 Options:
-  -J, --bigjobs=N    how many patches (or patch series) can be checked
-                     at the same time (default 1);
   -v, --verbose      be verbose;
   -h, --help         show this text and exit.
 EOF
@@ -97,18 +96,12 @@ cleanup_handler()
 }
 set_cleanup_handler cleanup_handler
 
-TEMP=`getopt -n $PROG -o J:,v,h --long bigjobs:,verbose,help -- "$@"` ||
+TEMP=`getopt -n $PROG -o J:,v,h --long verbose,help -- "$@"` ||
        fail_usage ""
 eval set -- "$TEMP"
 
-bigjobs=1
-
 while true; do
        case "$1" in
-       -J|--bigjobs)
-               bigjobs="$(opt_check_number "$1" "$2")"
-               shift
-               ;;
        -v|--verbose) verbose="--verbose"
                ;;
        -h|--help)
@@ -133,6 +126,8 @@ mkdir $verbose -p -- "$1" 1>&2
 queuedir="$(readlink -fv -- "$1")"; shift
 cfgfile="$1"; shift
 
+parse_config "$cfgfile"
+
 in_fifo="$(mktemp -dt "$PROG.in_fifo.XXXX")"
 tmpdir="$(mktemp -dt "$PROG.tmpdir.XXXX")"
 
@@ -145,7 +140,7 @@ mkfifo -- "$fifo"
 #
 # We execute the below command as a separate process - it will run the
 # aiaiai-email-test-patchset for every file name read from the fifo.
-tail -f -- "$fifo" | xargs -I{} -P"$bigjobs" -- \
+tail -f -- "$fifo" | xargs -I{} -P"$cfg_max_validators" -- \
        aiaiai-email-dispatcher-helper $verbose -- "$in_fifo/{}" "$tmpdir/STOP" \
                                      "$queuedir" "$cfgfile" >&2 &
 
index f21884b2fbf05689fcde55798d4b0215ee70068e..9e17f70cb02b3cf60a8948a1c62763b6d1013b31 100644 (file)
@@ -139,7 +139,7 @@ ini_config_get_or_die()
 # file:
 #
 # cfg_ownname, cfg_ownmail, cfg_adminname, cfg_adminmail, cfg_workdir,
-# cfg_jobs, cfg_preamble, cfg_signature, cfg_built_preamble
+# cfg_max_validators, cfg_jobs, cfg_preamble, cfg_signature, cfg_built_preamble
 #
 # Additionally, the following variables are set:
 #  o cfg_ownmail_local - the local portion of the ownmail address
@@ -156,6 +156,7 @@ parse_config()
        ini_config_get_or_die cfg_adminmail      "$cfgfile" "global" "adminmail"
        ini_config_get_or_die cfg_adminname      "$cfgfile" "global" "adminname"
        ini_config_get_or_die cfg_workdir        "$cfgfile" "global" "workdir"
+       ini_config_get_or_die cfg_max_validators "$cfgfile" "global" "max_validators"
        ini_config_get_or_die cfg_jobs           "$cfgfile" "global" "jobs"
        ini_config_get_or_die cfg_preamble       "$cfgfile" "global" "preamble"
        ini_config_get_or_die cfg_signature      "$cfgfile" "global" "signature"