mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Update external test suite locations
This commit is contained in:
parent
5249a16384
commit
34e577c4f0
9 changed files with 39 additions and 49 deletions
|
@ -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
|
||||
}
|
||||
|
|
6
CHANGES
6
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)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.6-16
|
||||
2.6-18
|
||||
|
|
1
testing/external/.gitignore
vendored
1
testing/external/.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
*.git
|
||||
diag.log
|
||||
bro-testing*
|
||||
zeek-testing*
|
||||
.proxy
|
||||
|
|
2
testing/external/Makefile
vendored
2
testing/external/Makefile
vendored
|
@ -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
|
||||
|
|
2
testing/external/README
vendored
2
testing/external/README
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue