~raharper/curtin/trunk.lp1641661

« back to all changes in this revision

Viewing changes to tools/jenkins-runner

  • Committer: Scott Moser
  • Date: 2016-08-05 18:01:25 UTC
  • mfrom: (411.2.1 trunk.plog)
  • Revision ID: smoser@ubuntu.com-20160805180125-ghdw0r67n1uyjld3
get CURTIN_VMTEST_PARALLEL shown correctly in jenkins-runner output

CURTIN_VMTEST_PARALLEL was not getting shown correctly unless it
was set in the environment. This will display it to the effective
value of the environment or --parallel flag.

Also, change some quoting that vim highlighting didn't like.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
 
3
 
topdir=${CURTIN_VMTEST_TOPDIR:-"${WORKSPACE:-$PWD}/output"}
 
3
topdir="${CURTIN_VMTEST_TOPDIR:-${WORKSPACE:-$PWD}/output}"
4
4
pkeep=${CURTIN_VMTEST_KEEP_DATA_PASS:-logs,collect}
5
5
fkeep=${CURTIN_VMTEST_KEEP_DATA_FAIL:-logs,collect}
6
6
export CURTIN_VMTEST_KEEP_DATA_PASS=$pkeep
7
7
export CURTIN_VMTEST_KEEP_DATA_FAIL=$fkeep
8
8
export CURTIN_VMTEST_TOPDIR="$topdir"
9
 
export CURTIN_VMTEST_LOG=${CURTIN_VMTEST_LOG:-"$topdir/debug.log"}
10
 
export CURTIN_VMTEST_PARALLEL=${CURTIN_VMTEST_PARALLEL}
 
9
export CURTIN_VMTEST_LOG="${CURTIN_VMTEST_LOG:-$topdir/debug.log}"
 
10
export CURTIN_VMTEST_PARALLEL=${CURTIN_VMTEST_PARALLEL:-0}
11
11
export IMAGE_DIR=${IMAGE_DIR:-/srv/images}
12
12
 
13
13
fail() { echo "$@" 1>&2; exit 1; }
18
18
mkdir -p "$topdir" || fail "failed mkdir $topdir"
19
19
 
20
20
start_s=$(date +%s)
21
 
# dump CURTIN* variables just for info
22
 
for v in ${!CURTIN_*}; do
23
 
   echo "$v=${!v}"
24
 
done
25
 
 
26
21
parallel=${CURTIN_VMTEST_PARALLEL}
27
22
ntargs=( )
28
23
while [ $# -ne 0 ]; do
39
34
    shift;
40
35
done
41
36
 
 
37
CURTIN_VMTEST_PARALLEL=$parallel
 
38
 
42
39
if [ ${#ntargs[@]} -eq 0 ]; then
43
40
   set -- -vv --nologcapture tests/vmtests/
44
41
fi
45
42
 
 
43
# dump CURTIN* variables just for info
 
44
for v in ${!CURTIN_*}; do
 
45
   echo "$v=${!v}"
 
46
done
 
47
 
46
48
ntargs=( "${ntargs[@]}" "$@" )
47
49
 
48
50
pargs=( )
65
67
echo "$(date -R): vmtest end [$ret] in $(($end_s-$start_s))s"
66
68
exit $ret
67
69
 
68
 
# vi: ts=4 expandtab
 
70
# vi: ts=4 expandtab syntax=sh