diff options
author | Arthur She <arthur.she@linaro.org> | 2014-09-18 10:18:15 -0700 |
---|---|---|
committer | Arthur She <arthur.she@linaro.org> | 2014-09-18 10:18:15 -0700 |
commit | 585f9c5a9320c6de8f5c5869a8cb2f5d5e564373 (patch) | |
tree | e3f5f58de5e16bc8292ff2c5d127980293ba1394 | |
parent | f805e0a3bfff2b615cdca9d4b8860cffb753241a (diff) |
Continue clone next kernel source while get issue.
modified: kselftest-repo-update.sh
-rwxr-xr-x | kselftest-repo-update.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/kselftest-repo-update.sh b/kselftest-repo-update.sh index e7c06f4..63ef33d 100755 --- a/kselftest-repo-update.sh +++ b/kselftest-repo-update.sh @@ -1,11 +1,11 @@ #!/bin/bash # # This script is used to update in-kernel-tests (kernel_src/tools/testing/selftest) -#CONFIG_FILE="./kselftest-repo.conf" -CONFIG_FILE="./kselftest-repo-arthur.conf" +CONFIG_FILE="./kselftest-repo.conf" +#CONFIG_FILE="./kselftest-repo-arthur.conf" . ${CONFIG_FILE} -#TCODE_REPO="ssh://git@git.linaro.org/people/arthur.she/in-kernel-tests.git" -TCODE_REPO="file:///media/arthur/arthur-usb3/linaro/qa/git/kselftest.git" +TCODE_REPO="ssh://git@git.linaro.org/people/arthur.she/in-kernel-tests.git" +#TCODE_REPO="file:///media/arthur/arthur-usb3/linaro/qa/git/kselftest.git" WORKING_DIR="/tmp/qa-kselftest" KSRC_DIR="${WORKING_DIR}/kernel_src" TCODE_DIR="${WORKING_DIR}/kselftest" @@ -21,9 +21,10 @@ checkout_branch () { else # This branch is not what we want, check out the target branch [ -z "`git branch|grep \"$1$\"`" ] && git checkout -b $1 origin/$1 || git checkout $1 - [ $? -ne 0 ] && echo "Error: Can not clone branch \"$1\"" && exit 1 + [ $? -ne 0 ] && echo "Error: Can not clone branch \"$1\"" && return 1 git pull fi + return 0 } clone_repo () { @@ -40,7 +41,8 @@ clone_repo () { # We have to clone the kernel source git clone -b $2 $1 $3 fi - [ $? -ne 0 ] && echo "Error: Can not clone branch \"$2\" from repo: $1" && exit 1 + [ $? -ne 0 ] && echo "Error: Can not clone branch \"$2\" from repo: $1" && return 1 + return 0 } [ -d ${WORKING_DIR} ] || mkdir -p ${WORKING_DIR} @@ -48,7 +50,7 @@ clone_repo () { # Clone our test code echo "Cloning test code" clone_repo ${TCODE_REPO} master ${TCODE_DIR} - +[ $? -ne 0 ] && exit 1 pushd ${TCODE_DIR} for i in `seq 0 $((${#REMOTE_REPO[@]}-1))`; do @@ -58,6 +60,7 @@ do kworking_dir="${KSRC_DIR}/${dir_name}" echo -e "\nSync with repo: ${remote_repo}\n" clone_repo ${remote_repo} ${remote_branch} ${kworking_dir} + [ $? -ne 0 ] && continue pushd ${kworking_dir} cm=`git log -n1|head -n1|awk '{print $NF}'` commit_comment="Update to ${cm} from repo ${remote_repo} branch ${remote_branch}" |