Merge pull request #356 from Liujingfang1/testing

Update directories in test script
This commit is contained in:
k8s-ci-robot 2018-03-16 15:40:26 -07:00 committed by GitHub
commit b68d9f07aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 16 deletions

View File

@ -33,23 +33,17 @@ export PATH=$GOPATH/bin:$PATH
home=`pwd` home=`pwd`
example_dir="some/default/dir/for/examples" example_dir="some/default/dir/for/examples"
if [ $# -eq 1 ]; then if [ $# -eq 1 ]; then
example_dir=$1 example_dir=$1
fi fi
if [ ! -d ${example_dir} ]; then if [ ! -d ${example_dir} ]; then
exit_with "directory ${example_dir} doesn't exist" exit_with "directory ${example_dir} doesn't exist"
fi fi
test_targets=$(ls ${example_dir}) if [ -x "${example_dir}/tests/test.sh" ]; then
${example_dir}/tests/test.sh ${example_dir}
for t in ${test_targets}; do if [ $? -eq 0 ]; then
cd ${example_dir}/${t} echo "testing ${example_dir} passed."
if [ -x "tests/test.sh" ]; then else
tests/test.sh . exit_with "testing ${example_dir} failed."
if [ $? -eq 0 ]; then fi
echo "testing ${t} passed." fi
else
exit_with "testing ${t} failed."
fi
fi
cd ${home}
done