<div dir="ltr">No, someone else (e.g. another bot) may be pushing to this repo at the same time. <div>I've tested this script by running two fuzzers and pushing the tests from two clones of repo in parallel. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 12, 2015 at 4:26 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">----- Original Message -----<br>
> From: "Kostya Serebryany" <<a href="mailto:kcc@google.com">kcc@google.com</a>><br>
> To: <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> Sent: Tuesday, May 12, 2015 6:19:12 PM<br>
> Subject: [llvm] r237208 - [lib/Fuzzer] A simple script to synchronise a fuzz  test corpus with an external git<br>
> repository.<br>
><br>
> Author: kcc<br>
> Date: Tue May 12 18:19:12 2015<br>
> New Revision: 237208<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=237208&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=237208&view=rev</a><br>
> Log:<br>
> [lib/Fuzzer] A simple script to synchronise a fuzz test corpus with<br>
> an external git repository.<br>
><br>
> Added:<br>
>     llvm/trunk/lib/Fuzzer/pull_and_push_fuzz_corpus.sh   (with props)<br>
><br>
> Added: llvm/trunk/lib/Fuzzer/pull_and_push_fuzz_corpus.sh<br>
> URL:<br>
> <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/pull_and_push_fuzz_corpus.sh?rev=237208&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/pull_and_push_fuzz_corpus.sh?rev=237208&view=auto</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Fuzzer/pull_and_push_fuzz_corpus.sh (added)<br>
> +++ llvm/trunk/lib/Fuzzer/pull_and_push_fuzz_corpus.sh Tue May 12<br>
> 18:19:12 2015<br>
> @@ -0,0 +1,17 @@<br>
> +#!/bin/bash<br>
> +# A simple script to synchronise a fuzz test corpus<br>
> +# with an external git repository.<br>
> +# Usage:<br>
> +#   pull_and_push_fuzz_corpus.sh DIR<br>
> +# It assumes that DIR is inside a git repo and push<br>
> +# can be done w/o typing a password.<br>
> +cd $1<br>
> +git add *<br>
> +git commit -m "fuzz test corpus"<br>
> +git pull --no-edit<br>
> +for((attempt=0; attempt<100; attempt++)); do<br>
> +  echo GIT PUSH $1 ATTEMPT $attempt<br>
> +  if $(git push); then break; fi<br>
<br>
</div></div>You have a very unreliable git repo?<br>
<br>
 -Hal<br>
<div class="HOEnZb"><div class="h5"><br>
> +  git pull --no-edit<br>
> +done<br>
> +<br>
><br>
> Propchange: llvm/trunk/lib/Fuzzer/pull_and_push_fuzz_corpus.sh<br>
> ------------------------------------------------------------------------------<br>
>     svn:executable = *<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</font></span></blockquote></div><br></div>