diff --git a/.update-changes.cfg b/.update-changes.cfg index 01cdbbeac4..e3d04b7422 100644 --- a/.update-changes.cfg +++ b/.update-changes.cfg @@ -7,15 +7,15 @@ function new_version_hook # test suite repos to check out on a CI system. version=$1 - if [ -d testing/external/bro-testing ]; then - echo "Updating testing/external/commit-hash.bro-testing" - ( cd testing/external/bro-testing && git fetch origin && git rev-parse origin/master ) > testing/external/commit-hash.bro-testing - git add testing/external/commit-hash.bro-testing + if [ -d testing/external/zeek-testing ]; then + echo "Updating testing/external/commit-hash.zeek-testing" + ( cd testing/external/zeek-testing && git fetch origin && git rev-parse origin/master ) > testing/external/commit-hash.zeek-testing + git add testing/external/commit-hash.zeek-testing fi - if [ -d testing/external/bro-testing-private ]; then - echo "Updating testing/external/commit-hash.bro-testing-private" - ( cd testing/external/bro-testing-private && git fetch origin && git rev-parse origin/master ) > testing/external/commit-hash.bro-testing-private - git add testing/external/commit-hash.bro-testing-private + if [ -d testing/external/zeek-testing-private ]; then + echo "Updating testing/external/commit-hash.zeek-testing-private" + ( cd testing/external/zeek-testing-private && git fetch origin && git rev-parse origin/master ) > testing/external/commit-hash.zeek-testing-private + git add testing/external/commit-hash.zeek-testing-private fi } diff --git a/CHANGES b/CHANGES index 65998be0bb..2adf8657bc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,10 @@ +2.6-18 | 2018-12-06 20:11:01 -0600 + + * Update external test suite locations (Jon Siwek, Corelight) + + * Update submodules to use github.com/zeek (Jon Siwek, Corelight) + 2.6-16 | 2018-11-29 17:05:44 -0600 * Parallelize communication tests using btest TEST-PORT (Jon Siwek, Corelight) diff --git a/VERSION b/VERSION index 068ba3547d..883a8c39ea 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6-16 +2.6-18 diff --git a/testing/external/.gitignore b/testing/external/.gitignore index 9b7a29b755..e0c927b0f6 100644 --- a/testing/external/.gitignore +++ b/testing/external/.gitignore @@ -1,4 +1,5 @@ *.git diag.log bro-testing* +zeek-testing* .proxy diff --git a/testing/external/Makefile b/testing/external/Makefile index bf384edd86..f92da2a076 100644 --- a/testing/external/Makefile +++ b/testing/external/Makefile @@ -1,5 +1,5 @@ -PUBLIC_REPO=git://git.bro.org/bro-testing +PUBLIC_REPO=https://github.com/zeek/zeek-testing REPOS=`./scripts/find-git-repos ` DIAG=diag.log diff --git a/testing/external/README b/testing/external/README index 345c7a81ae..ee6d71979e 100644 --- a/testing/external/README +++ b/testing/external/README @@ -47,7 +47,7 @@ test repository: .. console: - > cd bro-testing + > cd zeek-testing > btest All the standard ``btest`` options can be used to run individual diff --git a/testing/external/commit-hash.bro-testing b/testing/external/commit-hash.zeek-testing similarity index 100% rename from testing/external/commit-hash.bro-testing rename to testing/external/commit-hash.zeek-testing diff --git a/testing/external/commit-hash.bro-testing-private b/testing/external/commit-hash.zeek-testing-private similarity index 100% rename from testing/external/commit-hash.bro-testing-private rename to testing/external/commit-hash.zeek-testing-private diff --git a/testing/scripts/travis-job b/testing/scripts/travis-job index 656ff7bb11..731811fa2e 100644 --- a/testing/scripts/travis-job +++ b/testing/scripts/travis-job @@ -114,8 +114,7 @@ build_in_docker() { # Run Bro tests in a docker container. run_in_docker() { - prepare_env - docker exec -t -e TRAVIS -e TRAVIS_PULL_REQUEST -e trav_key -e trav_iv brotest sh testing/scripts/travis-job run travis + docker exec -t -e TRAVIS -e TRAVIS_PULL_REQUEST -e TESTING_PRIVATE_DEPLOYKEY brotest sh testing/scripts/travis-job run travis } @@ -131,39 +130,23 @@ build() { } -# Rename the encrypted environment variables to avoid having the hash value -# hard-coded multiple times in this script. -prepare_env() { - if [ -z "$trav_key" ]; then - # This hash value is found by logging into the Travis CI website, - # and looking at the settings in the bro repo (look in the - # "Environment Variables" section). - hash=6a6fe747ff7b - eval "trav_key=\$encrypted_${hash}_key" - eval "trav_iv=\$encrypted_${hash}_iv" - # Export so they are visible in docker containers. - export trav_key - export trav_iv - fi -} - - # Get the private tests. get_private_tests() { - prepare_env - if [ "${TRAVIS}" != "true" ]; then # When not running in the Travis environment, just skip trying to get # the private tests. echo "Note: skipping private tests (to run them, do a git clone of the private testing repo in the 'testing/external' directory before running this script)." - elif [ -n "$trav_key" ] && [ -n "$trav_iv" ]; then - curl https://www.bro.org/static/travis-ci/travis_key.enc -o travis_key.enc - openssl aes-256-cbc -K $trav_key -iv $trav_iv -in travis_key.enc -out travis_key -d + elif [ -n "$TESTING_PRIVATE_DEPLOYKEY" ]; then + echo "$TESTING_PRIVATE_DEPLOYKEY" > travis_key.b64 + base64 --decode travis_key.b64 > travis_key + rm travis_key.b64 chmod 600 travis_key mkdir -p ~/.ssh mv travis_key ~/.ssh/id_rsa - echo "git.bro.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmlu+EaJfPKTVqoEUzb5JBEdvNiFxO2wm7Vl61dGBl57avakFl8YnRujbA2yxlpC2xnEKD5y++hXxtxRLefyCM=" >> ~/.ssh/known_hosts - git clone ssh://git@git.bro.org/bro-testing-private + echo "Host *" >> ~/.ssh/config + echo " StrictHostKeyChecking no" >> ~/.ssh/config + chmod 400 ~/.ssh/config + git clone ssh://git@github.com:zeek/zeek-testing-private rm ~/.ssh/id_rsa elif [ -n "${TRAVIS_PULL_REQUEST}" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then # For pull request builds, the private key is not available, so skip @@ -196,26 +179,26 @@ run() { echo cd ../external - if [ ! -d bro-testing ]; then + if [ ! -d zeek-testing ]; then make init fi - if [ -d bro-testing ]; then - commit=`cat commit-hash.bro-testing` + if [ -d zeek-testing ]; then + commit=`cat commit-hash.zeek-testing` echo "Checking out $commit" - ( cd bro-testing && git checkout -q $commit ) + ( cd zeek-testing && git checkout -q $commit ) fi echo - if [ ! -d bro-testing-private ]; then + if [ ! -d zeek-testing-private ]; then get_private_tests fi - if [ -d bro-testing-private ]; then - commit=`cat commit-hash.bro-testing-private` + if [ -d zeek-testing-private ]; then + commit=`cat commit-hash.zeek-testing-private` echo "Checking out $commit" - ( cd bro-testing-private && git checkout -q $commit ) + ( cd zeek-testing-private && git checkout -q $commit ) fi echo @@ -224,8 +207,8 @@ run() { set +e - if [ -d bro-testing ]; then - cd bro-testing + if [ -d zeek-testing ]; then + cd zeek-testing make if [ $? -ne 0 ]; then @@ -236,8 +219,8 @@ run() { cd .. fi - if [ -d bro-testing-private ]; then - cd bro-testing-private + if [ -d zeek-testing-private ]; then + cd zeek-testing-private make if [ $? -ne 0 ]; then