simplify gem test harnesses

rely on test_all_gems.sh to output header and trailer,
and use `set -e` in each test.sh to simplify passing
through errors

Change-Id: I3ba724ad2539ddfe31195394c43f646acfc73920
Reviewed-on: https://gerrit.instructure.com/70469
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2016-01-18 09:47:35 -07:00
parent b76917cc9f
commit f552f4fc00
42 changed files with 43 additions and 443 deletions

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ activesupport-suspend_callbacks ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ adheres_to_policy ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,7 +1,5 @@
#!/usr/bin/env bash
set -e
bundle check || bundle install
bundle exec rake spec
exit $?

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ bookmarked_collection ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ broadcast_policy ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_breach_mitigation ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_cassandra ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_ext ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_http ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_i18nliner ################"
npm install
npm test
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_kaltura ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_mimetype_fu ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_panda_pub ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_quiz_statistics ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_sanitize ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_sort ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,16 +1,7 @@
#!/bin/bash
result=0
echo "################ canvas_stringex ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
result=$?
bundle exec rake refresh_db
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_text_helper ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_time ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ canvas_unzip ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ csv_diff ################"
bundle check || bundle install
bundle exec rspec spec
result+=$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ diigo ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ event_stream ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,16 +1,6 @@
#!/bin/bash
result=0
set -e
echo "################ google_docs ################"
rm -f Gemfile.lock
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,16 +1,6 @@
#!/bin/bash
result=0
set -e
echo "################ google_drive ################"
rm -f Gemfile.lock
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,16 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ handlebars_tasks ################"
bundle check || bundle install
bundle exec rspec spec
result+=$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ html_text_helper ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ i18n_extraction ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ i18n_tasks ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ incoming_mail_processor ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ json_token ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ linked_in ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ live_events ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ lti_outbound ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,16 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ multipart ################"
bundle check || bundle install
bundle exec rspec spec
result+=$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ paginated_collection ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,6 @@
#!/bin/bash
result=0
set -e
echo "################ csv_diff ################"
bundle check || bundle install
bundle exec rspec spec
result+=$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ selinimum ################"
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -3,6 +3,7 @@ result=0
for test_script in $(find . -name test.sh); do
pushd `dirname $test_script` > /dev/null
echo "################ $(basename `dirname $test_script`) ################"
./test.sh
let gem_result=$?
let result=result+gem_result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ turnitin_api ################"
bundle check || bundle install
bundle exec rspec spec
result+=$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,6 @@
#!/bin/bash
result=0
set -e
rm -f Gemfile.lock
bundle check || bundle install
bundle exec rspec spec
let result=$result+$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result

View File

@ -1,15 +1,5 @@
#!/bin/bash
result=0
set -e
echo "################ utf8_cleaner ################"
bundle check || bundle install
bundle exec rspec spec
result+=$?
if [ $result -eq 0 ]; then
echo "SUCCESS"
else
echo "FAILURE"
fi
exit $result