X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fdrush%2Fdrush%2Ftests%2FtestChildren.sh;fp=vendor%2Fdrush%2Fdrush%2Ftests%2FtestChildren.sh;h=372ce72e371235b8b269fd86544b91e1957d91bb;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/vendor/drush/drush/tests/testChildren.sh b/vendor/drush/drush/tests/testChildren.sh new file mode 100755 index 000000000..372ce72e3 --- /dev/null +++ b/vendor/drush/drush/tests/testChildren.sh @@ -0,0 +1,16 @@ +# See https://github.com/drush-ops/drush/pull/1426 for background information. +# +# $AUTH_TOKEN is provided via a secure Travis environment variable. +# Secure environment variables are not set for pull requests that +# originated from another repository, so skip child tests if $AUTH_TOKEN +# is empty. +if [ -n "$AUTH_TOKEN" ] +then + # After a travis build succeeds, run tests from any child repository defined in $TEST_CHILDREN + for CHILD in $TEST_CHILDREN + do + BUILD_NUM=$(curl -s "https://api.travis-ci.org/repos/$CHILD/builds" | grep -o '^\[{"id":[0-9]*,' | grep -o '[0-9]' | tr -d '\n') + echo "Restarting build $BUILD_NUM for $CHILD" + curl -X POST https://api.travis-ci.org/builds/$BUILD_NUM/restart --header "Authorization: token "$AUTH_TOKEN + done +fi