Skip to content

Commit 6c308e1

Browse files
committed
Small cleanup to exitcode logic
1 parent 6c11f6e commit 6c308e1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

script/cibuild

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ if [ "$RSPEC_TEST" = "true" ]; then
100100

101101
# Run the tests
102102
echo "Running rspec unit tests"
103-
time bundle exec rake spec:spec
103+
time bundle exec rspec "${DIR}/spec/octocatalog-diff/tests"
104104
exitcode=$?
105105
if [ "$exitcode" -ne 0 ]; then RSPEC_EXITCODE="$exitcode"; fi
106106
cat "$OUTPUT_FILE"
@@ -112,7 +112,6 @@ if [ "$RSPEC_TEST" = "true" ]; then
112112
echo "Running rspec integration tests"
113113
for file in "${DIR}"/spec/octocatalog-diff/integration/*_spec.rb; do
114114
retry=1
115-
exitcode=255
116115
for try in 1 2 3 ; do
117116
if [ $retry -eq 1 ]; then
118117
retry=0
@@ -123,11 +122,12 @@ if [ "$RSPEC_TEST" = "true" ]; then
123122
RSPEC_EXITCODE="255"
124123
elif [ $exitcode -eq 124 ] && [ $try -lt 3 ]; then
125124
retry=1
125+
elif [ $exitcode -ne 0 ]; then
126+
RSPEC_EXITCODE="$exitcode"
126127
fi
127128
fi
128129
done
129130

130-
if [ "$exitcode" -ne 0 ]; then RSPEC_EXITCODE="$exitcode"; fi
131131
cat "$OUTPUT_FILE"
132132
done
133133
done

0 commit comments

Comments
 (0)