diff --git a/testing/external/.gitignore b/testing/external/.gitignore index e0c927b0f6..594dbf1f06 100644 --- a/testing/external/.gitignore +++ b/testing/external/.gitignore @@ -1,5 +1,4 @@ *.git diag.log -bro-testing* zeek-testing* .proxy diff --git a/testing/external/Baseline/.gitignore b/testing/external/Baseline/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/testing/external/Makefile b/testing/external/Makefile index f92da2a076..25efdad05b 100644 --- a/testing/external/Makefile +++ b/testing/external/Makefile @@ -1,6 +1,6 @@ PUBLIC_REPO=https://github.com/zeek/zeek-testing -REPOS=`./scripts/find-git-repos ` +REPOS=`./scripts/find-git-repos` DIAG=diag.log diff --git a/testing/external/README b/testing/external/README index 6ab327b581..9bfd7790a0 100644 --- a/testing/external/README +++ b/testing/external/README @@ -81,19 +81,21 @@ script to set that up: .. console: - > ./scripts/create-new-repo + > ./scripts/create-new-repo [] -The first argument is the local name of the repository (it will be -cloned into ````); and the second is the URL of the git -repository. The repository will be initialized with a few standard -directories as well as a skeleton test in ``/tests``. You can -then edit files as needed. You add trace files by editing -``Traces/traces.cfg``; see the comments in there. For each trace, you -also need to calculate a checksum with ``md5sum`` and put it into -``.md5sum``. The scripts use this to decide if they need to -redownload the trace. Accordingly, if you update a trace, make sure to -also recalculate its checksum. Note that the traces will be downloaded -to ``Traces/`` but must not be added to the git repostiory; there's a -``.gitignore`` installed to prevent that. +The first argument is the local name of the repository (it will be initialized +in a ```` directory). The second, optional argument is the URL of the +git repository. The repository will be initialized with a few standard +directories as well as a skeleton test in ``/tests``. You can then edit +files as needed. When provided, the remote URL is added as the origin remote. +The script does not otherwise interact with the remote. + +You add trace files by editing ``Traces/traces.cfg``; see the comments in +there. For each trace, you also need to calculate a checksum with ``md5sum`` and +put it into ``.md5sum``. The scripts use this to decide if they need to +redownload the trace. Accordingly, if you update a trace, make sure to also +recalculate its checksum. Note that the traces will be downloaded to ``Traces/`` +but must not be added to the git repostiory; there's a ``.gitignore`` installed +to prevent that. diff --git a/testing/external/scripts/create-new-repo b/testing/external/scripts/create-new-repo index 8d64d73ca3..7ea5be13a4 100755 --- a/testing/external/scripts/create-new-repo +++ b/testing/external/scripts/create-new-repo @@ -1,31 +1,26 @@ #! /usr/bin/env bash +# +# Helper script for creating new external testing repos. See the +# README for details. cwd=`pwd` -if [ $# != 2 ]; then - echo "usage: $0 " +if [ -z "$1" ]; then + echo "usage: $0 []" exit 1 fi name=`pwd`/$1 repo=$2 -if [ -e $repo ]; then - echo "$repo already exists, aborting." - exit 1 -fi - if [ -e $name ]; then echo "$name already exists, aborting." exit 1 fi -mkdir $repo -( cd $repo && git init --bare ) - -git clone $repo $name - +mkdir $name cd $name +git init for dir in tests Baseline; do mkdir $dir @@ -42,4 +37,7 @@ cp $cwd/`dirname $0`/skel/.gitignore . git add * .gitignore git commit -m "Repository initialized." -git push origin master + +if [ -n "$repo" ]; then + git remote add origin $repo +fi diff --git a/testing/external/subdir-btest.cfg b/testing/external/subdir-btest.cfg index c4abb1917d..21ece3f44c 100644 --- a/testing/external/subdir-btest.cfg +++ b/testing/external/subdir-btest.cfg @@ -21,6 +21,6 @@ DIST=%(testbase)s/../../.. BUILD=%(testbase)s/../../../build ZEEK_PROFILER_FILE=%(testbase)s/.tmp/script-coverage/XXXXXX ZEEK_DNS_FAKE=1 -# For fedora 21 - they disable MD5 for certificate verification and need setting an environment variable to permit it. +# Fedora/CentOS/RedHat have MD5 disabled for certificate verification and need setting an environment variable to permit it: OPENSSL_ENABLE_MD5_VERIFY=1 UBSAN_OPTIONS=print_stacktrace=1