Skip to content

Commit eac0b85

Browse files
author
Frank Natividad
committed
Fixing run-all.sh to test all specs and fails cirlce if a spec fails
1 parent d0f6dd1 commit eac0b85

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

spec/run-all.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#! /bin/bash
2-
3-
set -e
1+
#!/bin/bash
42

53
for required_variable in \
64
GOOGLE_CLOUD_PROJECT \
@@ -25,12 +23,13 @@ export TRANSLATE_KEY="$TRANSLATE_API_KEY"
2523

2624
script_directory="$(dirname "`realpath $0`")"
2725
repo_directory="$(dirname $script_directory)"
26+
return_status=0 # no failures
2827

2928
for product in \
29+
logging \
3030
bigquery \
3131
datastore \
3232
language \
33-
logging \
3433
pubsub \
3534
speech \
3635
storage \
@@ -40,6 +39,12 @@ for product in \
4039
echo "[$product]"
4140
cd "$repo_directory/$product/"
4241
bundle install
43-
# Continue to run if a failure occurs
44-
bundle exec rspec --format documentation || true
42+
bundle exec rspec --format documentation
43+
44+
# Check for a spec failure
45+
if [ $? != 0 ]; then
46+
return_status=1
47+
fi
4548
done
49+
50+
exit $return_status

0 commit comments

Comments
 (0)