diff options
author | Matt Kwong <mattkwong@google.com> | 2016-09-26 12:05:05 -0700 |
---|---|---|
committer | Matt Kwong <mattkwong@google.com> | 2016-09-28 16:55:15 -0700 |
commit | 5d0f24600ef9b985bef3aada69e2f5847467c53c (patch) | |
tree | 16a8a8445fde16a15e656ae56de365c992dbc321 /tools/run_tests | |
parent | 46c7f574bd4a5298f09fd5d72924b93c355e357e (diff) |
changed method to local clone submodules to using git submodule foreach from the local copy
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-x | tools/run_tests/dockerize/docker_run.sh | 6 | ||||
-rwxr-xr-x | tools/run_tests/dockerize/docker_run_tests.sh | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/run_tests/dockerize/docker_run.sh b/tools/run_tests/dockerize/docker_run.sh index e57ceaf0ac..d50ea81750 100755 --- a/tools/run_tests/dockerize/docker_run.sh +++ b/tools/run_tests/dockerize/docker_run.sh @@ -38,9 +38,9 @@ then mkdir -p /var/local/git git clone "$EXTERNAL_GIT_ROOT" /var/local/git/grpc # clone gRPC submodules, use data from locally cloned submodules where possible - (cd var/local/git/grpc && exec git submodule | awk -v \ - EXTERNAL_GIT_ROOT=$EXTERNAL_GIT_ROOT/ '{ system("git submodule update --init \ - --reference " EXTERNAL_GIT_ROOT$2 " " $2) }') + (cd /var/local/jenkins/grpc / && git submodule foreach 'cd /var/local/git/grpc \ + && git submodule update --init --reference /var/local/jenkins/grpc/${name} \ + ${name}') else mkdir -p "/var/local/git/grpc/$RELATIVE_COPY_PATH" cp -r "$EXTERNAL_GIT_ROOT/$RELATIVE_COPY_PATH"/* "/var/local/git/grpc/$RELATIVE_COPY_PATH" diff --git a/tools/run_tests/dockerize/docker_run_tests.sh b/tools/run_tests/dockerize/docker_run_tests.sh index a1e94b2952..41d93e444d 100755 --- a/tools/run_tests/dockerize/docker_run_tests.sh +++ b/tools/run_tests/dockerize/docker_run_tests.sh @@ -43,10 +43,10 @@ chown $(whoami) $XDG_CACHE_HOME mkdir -p /var/local/git git clone /var/local/jenkins/grpc /var/local/git/grpc - # clone gRPC submodules, use data from locally cloned submodules where possible -(cd /var/local/git/grpc/ && exec git submodule | awk '{ system("git submodule \ -update --init --reference ./../../jenkins/grpc/" $2 " " $2) }') +(cd /var/local/jenkins/grpc / && git submodule foreach 'cd /var/local/git/grpc \ +&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \ +${name}') mkdir -p reports |