File tree Expand file tree Collapse file tree 6 files changed +19
-42
lines changed
Expand file tree Collapse file tree 6 files changed +19
-42
lines changed Original file line number Diff line number Diff line change 1313 if [ -f /tmp/dockercache/${{parameters.docker.image}}.tar ]; then docker load < /tmp/dockercache/${{parameters.docker.image}}.tar; fi
1414 displayName : ' Load Docker cache'
1515- script : |
16- cd $(Build.SourcesDirectory)/azure-pipelines/docker
17- docker build -t libgit2/${{parameters.docker.image}} --build-arg BASE=${{parameters.docker.base}} -f ${{parameters.docker.image}} .
18- if [ ! -d /tmp/dockercache ]; then mkdir /tmp/dockercache; fi
16+ cd $(Build.SourcesDirectory)/azure-pipelines/docker &&
17+ docker build -t libgit2/${{parameters.docker.image}} --build-arg BASE=${{parameters.docker.base}} -f ${{parameters.docker.image}} . &&
18+ if [ ! -d /tmp/dockercache ]; then mkdir /tmp/dockercache; fi &&
1919 docker save libgit2/${{parameters.docker.image}} $(docker history -q libgit2/${{parameters.docker.image}} | grep -v '<missing>') > /tmp/dockercache/${{parameters.docker.image}}.tar
2020 displayName : ' Build Docker image'
2121- task : docker@0
Original file line number Diff line number Diff line change 11ARG BASE
2- FROM $BASE
2+ FROM $BASE AS apt
33RUN apt-get update && \
4- apt-get install -y --no-install-recommends \
4+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
55 clang \
66 cmake \
77 curl \
88 gcc \
99 git \
10- gosu \
1110 libcurl4-openssl-dev \
1211 libpcre3-dev \
1312 libssh2-1-dev \
@@ -19,11 +18,12 @@ RUN apt-get update && \
1918 openssl \
2019 pkgconf \
2120 python \
21+ sudo \
2222 valgrind \
2323 && \
2424 rm -rf /var/lib/apt/lists/*
25- RUN mkdir /var/run/sshd
2625
26+ FROM apt AS mbedtls
2727RUN cd /tmp && \
2828 curl --location --silent https://tls.mbed.org/download/mbedtls-2.16.2-apache.tgz | \
2929 tar -xz && \
@@ -34,7 +34,9 @@ RUN cd /tmp && \
3434 cd .. && \
3535 rm -rf mbedtls-2.16.2
3636
37+ FROM mbedtls AS configure
3738COPY entrypoint.sh /usr/local/bin/entrypoint.sh
3839RUN chmod a+x /usr/local/bin/entrypoint.sh
40+ RUN mkdir /var/run/sshd
3941
4042ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
Original file line number Diff line number Diff line change 11#! /bin/bash -e
22useradd --shell /bin/bash libgit2
3- chown -R $( id -u libgit2) /home/libgit2
4- exec gosu libgit2 " $@ "
3+ chown --recursive libgit2:libgit2 /home/libgit2
4+ exec sudo --preserve-env --user= libgit2 " $@ "
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ RUN apt-get update && \
88 curl \
99 gcc \
1010 git \
11- gosu \
1211 krb5-user \
1312 libcurl4-gnutls-dev \
1413 libgcrypt20-dev \
@@ -23,7 +22,10 @@ RUN apt-get update && \
2322 openssl \
2423 pkgconf \
2524 python \
26- valgrind
25+ sudo \
26+ valgrind \
27+ && \
28+ rm -rf /var/lib/apt/lists/*
2729
2830FROM apt AS mbedtls
2931RUN cd /tmp && \
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -244,15 +244,15 @@ static void *cache_quick(void *arg)
244244
245245void test_object_cache__fast_thread_rush (void )
246246{
247- int try , th , data [THREADCOUNT * 2 ];
247+ int try , th , data [THREADCOUNT ];
248248#ifdef GIT_THREADS
249- git_thread t [THREADCOUNT * 2 ];
249+ git_thread t [THREADCOUNT ];
250250#endif
251251
252252 for (try = 0 ; try < REPEAT ; ++ try ) {
253253 cl_git_pass (git_repository_open (& g_repo , cl_fixture ("testrepo.git" )));
254254
255- for (th = 0 ; th < THREADCOUNT * 2 ; ++ th ) {
255+ for (th = 0 ; th < THREADCOUNT ; ++ th ) {
256256 data [th ] = th ;
257257#ifdef GIT_THREADS
258258 cl_git_pass (
@@ -263,7 +263,7 @@ void test_object_cache__fast_thread_rush(void)
263263 }
264264
265265#ifdef GIT_THREADS
266- for (th = 0 ; th < THREADCOUNT * 2 ; ++ th ) {
266+ for (th = 0 ; th < THREADCOUNT ; ++ th ) {
267267 void * rval ;
268268 cl_git_pass (git_thread_join (& t [th ], & rval ));
269269 cl_assert_equal_i (th , * ((int * )rval ));
You can’t perform that action at this time.
0 commit comments