2014-02-01 07:31:31 +08:00
|
|
|
#!/bin/bash
|
2020-03-16 20:23:58 +08:00
|
|
|
|
|
|
|
set -o xtrace
|
|
|
|
|
2014-02-01 07:31:31 +08:00
|
|
|
result=0
|
|
|
|
|
2019-08-22 02:25:33 +08:00
|
|
|
pushd "$(dirname $0)"
|
|
|
|
|
2014-02-01 07:31:31 +08:00
|
|
|
for test_script in $(find . -name test.sh); do
|
|
|
|
pushd `dirname $test_script` > /dev/null
|
2019-08-22 02:25:33 +08:00
|
|
|
echo -e "--format doc" >> ./.rspec
|
|
|
|
|
2016-01-19 00:47:35 +08:00
|
|
|
echo "################ $(basename `dirname $test_script`) ################"
|
2014-02-01 07:31:31 +08:00
|
|
|
./test.sh
|
2015-06-11 06:46:44 +08:00
|
|
|
let gem_result=$?
|
|
|
|
let result=result+gem_result
|
|
|
|
if [ $gem_result -eq 0 ]; then
|
|
|
|
echo "GEM SUCCESS"
|
|
|
|
else
|
|
|
|
echo "GEM FAILURE"
|
|
|
|
fi
|
2014-02-01 07:31:31 +08:00
|
|
|
popd > /dev/null
|
|
|
|
done
|
|
|
|
|
2019-08-22 02:25:33 +08:00
|
|
|
popd > /dev/null
|
|
|
|
|
2014-02-01 07:31:31 +08:00
|
|
|
echo "################ RESULT FOR ALL GEMS ################"
|
|
|
|
if [ $result -eq 0 ]; then
|
|
|
|
echo "SUCCESS"
|
|
|
|
else
|
|
|
|
echo "FAILURE"
|
|
|
|
fi
|
|
|
|
|
2014-02-24 17:31:21 +08:00
|
|
|
exit $result
|