mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Test repository directory names no longer need to end in *.git.
This commit is contained in:
parent
eb0580c622
commit
42f214b8d0
4 changed files with 30 additions and 14 deletions
16
testing/external/Makefile
vendored
16
testing/external/Makefile
vendored
|
@ -1,18 +1,26 @@
|
|||
|
||||
PUBLIC_REPO=git://git.bro-ids.org/bro-testing
|
||||
REPOS=`./scripts/find-git-repos `
|
||||
|
||||
DIAG=diag.log
|
||||
|
||||
all:
|
||||
@rm -f $(DIAG)
|
||||
@for repo in *.git; do (cd $$repo && make ); done
|
||||
@for repo in $(REPOS); do (cd $$repo && make ); done
|
||||
|
||||
brief:
|
||||
@rm -f $(DIAG)
|
||||
@for repo in *.git; do (cd $$repo && make brief ); done
|
||||
@for repo in $(REPOS); do (cd $$repo && make brief ); done
|
||||
|
||||
init:
|
||||
git clone $(PUBLIC_REPO) bro-testing.git
|
||||
git clone $(PUBLIC_REPO)
|
||||
|
||||
pull:
|
||||
@for repo in *.git; do ( cd $$repo && git pull ); done
|
||||
@for repo in $(REPOS); do ( cd $$repo && git pull ); done
|
||||
|
||||
push:
|
||||
@for repo in $(REPOS); do ( cd $$repo && git push origin HEAD ); done
|
||||
|
||||
status:
|
||||
@for repo in $(REPOS); do ( cd $$repo && echo '>>' $$repo && git status -bs && echo ); done
|
||||
|
||||
|
|
18
testing/external/README
vendored
18
testing/external/README
vendored
|
@ -30,15 +30,15 @@ Running Tests
|
|||
-------------
|
||||
|
||||
The easiest way to run all tests is simply typing ``make``. Doing so
|
||||
will iterate through all ``*.git`` repositories and run ``btest`` in
|
||||
each of them.
|
||||
will iterate through all git repositories found in the current
|
||||
directory and run ``btest`` in each of them.
|
||||
|
||||
Alternatively, one can also manually run all tests inside a single
|
||||
test repository:
|
||||
|
||||
.. console:
|
||||
|
||||
> cd bro-testing.git
|
||||
> cd bro-testing
|
||||
> btest
|
||||
|
||||
All the standard ``btest`` options can be used to run individual
|
||||
|
@ -51,7 +51,7 @@ To update a test's baseline, first run ``btest`` in update mode:
|
|||
|
||||
.. console:
|
||||
|
||||
> cd bro-testing.git
|
||||
> cd bro-testing
|
||||
> btest -U tests/test-you-want-to-update
|
||||
|
||||
Then use ``git`` to commit the changes and push the changes upstream
|
||||
|
@ -69,13 +69,13 @@ public one. A helper script is provided to set up such a repository:
|
|||
> ./scripts/create-new-repo <repo-name> <repo-url>
|
||||
|
||||
The first argument is the local name of the repository (it will be
|
||||
cloned into ``<repo-name>.git``); and then second is the path to the
|
||||
git repository. The repository will be initialized with a few standard
|
||||
directories as well as a skeleton test in ``<name>.git/tests``. You
|
||||
cloned into ``<repo-name>``); and then second is the path to the git
|
||||
repository. The repository will be initialized with a few standard
|
||||
directories as well as a skeleton test in ``<name>/tests``. You
|
||||
can then edit files as needed (and in particular add traces to
|
||||
``<name>.git/traces``).
|
||||
``<name>/traces``).
|
||||
|
||||
If you already have such a private test repository that you want to
|
||||
include into the test suite, clone it directly into
|
||||
``<repo-name>.git``.
|
||||
``<repo-name>``.
|
||||
|
||||
|
|
2
testing/external/scripts/create-new-repo
vendored
2
testing/external/scripts/create-new-repo
vendored
|
@ -7,7 +7,7 @@ if [ $# != 2 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
name=`pwd`/$1.git
|
||||
name=`pwd`/$1
|
||||
repo=$2
|
||||
|
||||
if [ -e $repo ]; then
|
||||
|
|
8
testing/external/scripts/find-git-repos
vendored
Executable file
8
testing/external/scripts/find-git-repos
vendored
Executable file
|
@ -0,0 +1,8 @@
|
|||
#! /usr/bin/env bash
|
||||
#
|
||||
# Returns a list of git repositories found in subdirs of the
|
||||
# current directory.
|
||||
|
||||
for i in `find . -type d`; do
|
||||
test -e $i/.git && echo $i
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue