Skip to content

Commit fae84be

Browse files
author
Your Name
committed
Format code
1 parent 62c3e70 commit fae84be

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

bin/rally-extract-tests.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
scratch=$(mktemp)
55

66
function finish {
7-
rm -rf "$scratch"
7+
rm -rf "$scratch"
88
}
99
trap finish EXIT
1010

1111
status=success
1212

1313
pass_thru=()
14-
while [[ $# -gt 0 ]]
15-
do
16-
key="$1"
17-
case $key in
14+
while [[ $# -gt 0 ]]; do
15+
key="$1"
16+
case $key in
1817
--status)
1918
status="$2"
2019
shift # past argument
2120
shift # past value
22-
;;
23-
*)
24-
pass_thru+=("$1")
25-
shift
26-
;;
27-
esac
21+
;;
22+
*)
23+
pass_thru+=("$1")
24+
shift
25+
;;
26+
esac
2827
done
29-
rally verify report --type json --to $scratch "${pass_thru[@]}" >/dev/null 3>&1; cat $scratch | jq -r '.tests | to_entries[] | select(.value.by_verification[].status == "'$status'") | "\(.key)"'
28+
rally verify report --type json --to $scratch "${pass_thru[@]}" >/dev/null 3>&1
29+
cat $scratch | jq -r '.tests | to_entries[] | select(.value.by_verification[].status == "'$status'") | "\(.key)"'

bin/rally-verify-wrapper.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ fi
3535

3636
pattern=""
3737
if [ ! -z ${TEMPEST_PATTERN:+x} ]; then
38-
pattern="--pattern $TEMPEST_PATTERN"
38+
pattern="--pattern $TEMPEST_PATTERN"
3939
fi
4040

4141
concurrency=""
4242
if [ ! -z ${TEMPEST_CONCURRENCY:+x} ]; then
43-
concurrency="--concurrency $TEMPEST_CONCURRENCY"
43+
concurrency="--concurrency $TEMPEST_CONCURRENCY"
4444
fi
4545

4646
if [ ! -d $artifacts_dir ]; then
47-
>&2 echo "You must mount a directory at $artifacts_dir"
47+
echo >&2 "You must mount a directory at $artifacts_dir"
4848
exit -1
4949
fi
5050

@@ -55,8 +55,8 @@ if [ -f ~/openrc ]; then
5555
elif [ ! -z ${TEMPEST_OPENRC:+x} ]; then
5656
. <(echo "$TEMPEST_OPENRC")
5757
else
58-
>&2 echo "Could not find openrc file. Please define TEMPEST_OPENRC or copy the file to ~/openrc."
59-
exit -1
58+
echo >&2 "Could not find openrc file. Please define TEMPEST_OPENRC or copy the file to ~/openrc."
59+
exit -1
6060
fi
6161
set -x
6262

@@ -74,14 +74,13 @@ if [ -f ~/tempest-overrides.conf ]; then
7474
rally verify configure-verifier --reconfigure --extend ~/tempest-overrides.conf
7575
fi
7676

77-
rally verify start $skip_list $load_list $pattern $concurrency\
78-
> >(tee -a $artifacts_dir/stdout.log) 2> >(tee -a $artifacts_dir/stderr.log >&2)
77+
rally verify start $skip_list $load_list $pattern $concurrency > >(tee -a $artifacts_dir/stdout.log) 2> >(tee -a $artifacts_dir/stderr.log >&2)
7978

8079
rally verify report --type html --to $artifacts_dir/rally-verify-report.html
8180
rally verify report --type json --to $artifacts_dir/rally-verify-report.json
8281
rally verify report --type junit-xml --to $artifacts_dir/rally-junit.xml
8382

84-
rally-extract-tests.sh --status fail > $artifacts_dir/failed-tests
83+
rally-extract-tests.sh --status fail >$artifacts_dir/failed-tests
8584

8685
# NOTE: this assumes only one of these files exists which should ordinarily
8786
# be the case when the container is discarded after one run.

0 commit comments

Comments
 (0)