Commit graph

46 commits

Author SHA1 Message Date
Jon Siwek
a7b905d389 GH-1149: Add GitHub Action to automate generation of zeek-docs 2020-09-01 17:52:00 -07:00
Jon Siwek
f45c2cf06b Skip check for outdated docs in Cirrus CI for PRs 2020-01-23 18:10:17 -08:00
Jon Siwek
30d0b21ecc Merge remote-tracking branch 'origin/topic/dev/print-to-log'
Adjustments during merge:

- kept the UNKNOWN Log::ID as placeholder value
- changed the coverage.find-bro-logs test to check for arbitrary $path
  field values instead of just string literals
- don't force EnumVal to unsigned integer since the relevant union member
  is the signed integer and added the relevant enum values/types to
  .bif files for easier access
- compare FILE* versus file name to check for stdout equality (don't
  think it matters much, just a bit more efficient)
- minor whitespace/style tweaks

* origin/topic/dev/print-to-log:
  Added a non boolean configuration and other changes as suggested by Jon
  Allow Print Statements to be redirected to a Log# This is a combination of 3 commits.
2019-12-02 13:47:09 -08:00
Jon Siwek
afb8bc6df8 Fix ZEEK_PROFILER_FILE file format/parsing
Some Zeek script statement descriptions were exceeding the hardcoded
maximum length and also could contain tab characters which were
supposed to be reserved for use as a delimiter in the file format.
2019-11-07 16:47:09 -08:00
Jon Siwek
09ea4ceb7e Rename a broxygen unit test to zeekygen 2019-07-31 14:25:22 -07:00
Daniel Thayer
1a74516db1 Rename all BRO-prefixed environment variables
For backward compatibility when reading values, we first check
the ZEEK-prefixed value, and if not set, then check the corresponding
BRO-prefixed value.
2019-05-22 00:12:31 -05:00
Jon Siwek
6ad7099f7e Merge remote-tracking branch 'origin/topic/robin/gh-239'
* origin/topic/robin/gh-239:
  Undo a change to btest.cfg from a recent commit
  Updating submodule.
  Fix zeek-wrapper
  Update for renaming BroControl to ZeekControl.
  Updating submodule.
  GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev.
2019-05-14 13:27:40 -07:00
Jon Siwek
84ca12fdb4 Rename Zeexygen to Zeekygen 2019-05-02 21:39:21 -07:00
Robin Sommer
789cb376fd GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev.
This also installs symlinks from "zeek" and "bro-config" to a wrapper
script that prints a deprecation warning.

The btests pass, but this is still WIP. broctl renaming is still
missing.

#239
2019-05-01 21:43:45 +00:00
Jon Siwek
aebcb1415d GH-234: rename Broxygen to Zeexygen along with roles/directives
* All "Broxygen" usages have been replaced in
  code, documentation, filenames, etc.

* Sphinx roles/directives like ":bro:see" are now ":zeek:see"

* The "--broxygen" command-line option is now "--zeexygen"
2019-04-22 19:45:50 -07:00
Jon Siwek
a994be9eeb Merge remote-tracking branch 'origin/topic/seth/zeek_init'
* origin/topic/seth/zeek_init:
  Some more testing fixes.
  Update docs and tests for bro_(init|done) -> zeek_(init|done)
  Implement the zeek_init handler.
2019-04-19 11:24:29 -07:00
Jon Siwek
1e57e3f026 Use .zeek file suffix in unit tests 2019-04-16 16:08:57 -07:00
Seth Hall
9d676d368b Some more testing fixes. 2019-04-14 09:58:30 -04:00
Daniel Thayer
4e0c1997a0 Update tests and baselines due to renaming all scripts 2019-04-11 23:32:58 -05:00
Jon Siwek
aff3f4b3fd Skip autogenerated doc coverage test for Travis pull requests 2019-02-15 17:53:53 -06:00
Jon Siwek
b1b7027982 Merge remote-tracking branch 'origin/rtd-test'
* origin/rtd-test:
  Disable RTD pdf format due to exceeded capacity
  Add RTD pdf format
  Add RTD yaml config file
  Remove some Bro usages in main TOC entries
  Remove "contents" Sphinx directive usages
  Add a `make livehtml` target
  Use sourcecode Sphinx directive more widely
  Use Sphinx RTD theme for user manual
  Replace some code-block Sphinx directives
  Remove unused Sphinx extensions
  Remove broxygen Sphinx integration
  Remove Sphinx btest integrations and tests
  Fix a Sphinx deprecation

These are all changes required to build documentation from a static
Sphinx tree (e.g. on Read the Docs)
2019-01-10 14:08:40 -06:00
Jon Siwek
7e9d48f532 Remove broxygen Sphinx integration
The broxygen-generated files now live in the git repo, have tests
that check that they are up-to-date, and a script to re-generate
them on-demand.
2018-12-18 10:15:22 -06:00
Daniel Thayer
5ebed9158f Add some missing @TEST-REQUIRES to a few tests 2018-09-25 15:52:19 -05:00
Jon Siwek
07aac5f84f Sort output of a coverage unit test 2018-09-04 12:09:20 -05:00
Daniel Thayer
4bd1668915 Fix the find-bro-logs.test
Updated the find-bro-logs.test to output the correct list of log files.
The test now runs about 50 times faster.

Also corrected a typo on the "Log Files" documentation page.
2018-08-31 22:52:16 -05:00
Jon Siwek
edf8658b11 Merge remote-tracking branch 'origin/topic/vladg/dhcp_event_deprecation'
* origin/topic/vladg/dhcp_event_deprecation:
  Add script to support the old DHCP events

Updated coverage tests and fixed incorrect DHCP:: scoping on some things
2018-08-17 16:38:19 -05:00
Jon Siwek
c859919f31 Improve canonicalization of build dir path in a coverage unit test 2018-05-01 18:10:11 -05:00
Jon Siwek
720cf55d53 Improve how coverage unit tests handle name of build dir
This change allows the tests to still pass if the build dir is named
something other than 'build' and/or is a symlink.
2018-04-30 16:30:21 -05:00
Daniel Thayer
f7c115a47a Fix a test that fails in some environments
The "coverage/init-default.test" will always fail if there is a
path component named "build" anywhere before the bro install
directory (for example, if the tests are run from home dir of a user
named "build").  Fixed this by making a regex more specific so that
it matches the correct lines in loaded_scripts.log.
2018-01-10 13:23:30 -06:00
Jon Siwek
7ef1409b40 Change find-bro-logs unit test to follow symlinks. 2014-10-09 16:02:13 -05:00
Daniel Thayer
072dad6508 Add error checks and messages to a test script 2014-10-08 10:42:35 -05:00
Daniel Thayer
6dc4863d81 Add a test that detects changes in the list of all Bro log files 2014-09-26 22:06:56 -05:00
Jon Siwek
d4ef9f3693 Fix missing @load dependencies in some scripts.
And update the unit test which is supposed to catch such errors.
2014-04-09 16:32:23 -05:00
Jon Siwek
25e28c04f0 Add a Broxygen coverage test. 2013-11-25 15:49:53 -06:00
Jon Siwek
9967aea52c Integrate new Broxygen functionality into Sphinx.
Add a "broxygen" domain Sphinx extension w/ directives to allow
on-the-fly documentation to be generated w/ Bro and included in files.

This means all autogenerated reST docs are now done by Bro.  The odd
CMake/Python glue scipts which used to generate some portions are now
gone.  Bro and the Sphinx extension handle checking for outdated docs
themselves.

Parallel builds of `make doc` target should now work (mostly because
I don't think there's any tasks that can be done in parallel anymore).

Overall, this seems to simplify things and make the Broxygen-generated
portions of the documentation visible/traceable from the main Sphinx
source tree.  The one odd thing still is that per-script documentation
is rsync'd in to a shadow copy of the Sphinx source tree within the
build dir.  This is less elegant than using the new broxygen extension
to make per-script docs, but rsync is faster and simpler.  Simpler as in
less code because it seems like, in the best case, I'd need to write a
custom Sphinx Builder to be able to get that to even work.
2013-11-21 14:34:32 -06:00
Robin Sommer
b76d1d07ca Test updates.
BIT-1044 #merged
2013-07-29 15:14:41 -07:00
Robin Sommer
e46300a724 Fixing test that would fail without ES/curl support.
It used to special-case an error message produced in the case that ES
isn't available, however with scripts/test-all-policy.bro now
explicitly disabling ES output, that doesn't seem necessary anymore.
2013-05-18 16:47:04 -07:00
Robin Sommer
9d483b7e74 Fixing coverage.bare-mode-errors test. 2013-05-01 17:52:16 -07:00
Jon Siwek
6caeb7d7cf Add --with-curl option to ./configure, addresses #877. 2012-10-08 16:27:15 -05:00
Jon Siwek
e66e9e5d32 Minor tweak to coverage.bare-mode-errors unit test.
Adding trailing slash to $DIST/scripts makes the `find` work
with a symlinked 'scripts' dir.
2012-08-22 11:12:27 -05:00
Jon Siwek
f201a9f1a7 Fix portability of printing to files returned by open("/dev/stderr").
The BroFile ctor now wraps /dev/std{in,out,err} string arguments
into the actual FILE* provided by stdio.h because use of the former
directly isn't POSIX compliant and led to subtle differences that
broke unit tests on certain platforms (e.g. OS X redirection of stderr
behavior started differing from Linux).  The BroFile (un)serialization
methods already did this kind of logic, so adding it in the ctor also
should make things more consistent.

Some of the reporter-related unit tests looked like they were missing
output because of this, and the coverage test for bare-mode errors
needed tweaking to branch on whether or not libcurl was available
(since the error output differs when elasticsearch isn't there).
2012-08-17 17:27:02 -05:00
Robin Sommer
b3155b7b4b Moving make target update-doc-sources from top-level Makefile to btest
Makefile.
2012-07-02 16:14:24 -07:00
Jon Siwek
0e48fda6ff Updating input framework unit tests.
Generally tried to make them more reliable and execute quicker.
They all now load the listen script as a trick to make sure input
sources are fully read, but also terminate() at appropriate times
so that they don't take more time than needed.  They're also all
serialized with the 'comm' group so listening on a port doesn't
interfere with the communication tests.
2012-06-29 12:50:57 -05:00
Robin Sommer
ea2bd659f3 Adding target update-doc-sources to top-level Makefile that runs
genDocSourcesList.sh.
2012-05-17 12:41:10 -07:00
Robin Sommer
f6f9dd952f Fixed for Brofiler merge. 2012-01-26 20:55:24 -08:00
Jon Siwek
713e3ac5d0 Add "# @no-test" tag to blacklist statements from test coverage analysis.
It can apply to either single statements:

    print "don't cover"; # @no-test

or a block of statements:

    if ( F )
        { # @no-test
        ...
        }
2012-01-13 14:52:58 -06:00
Seth Hall
da9b8cc283 Modification to the Communication framework API.
- Simplified the communication API and made it easier to change
  to encrypted connections by not having separate variables to
  define encrypted and unencrypted ports.

- Now, to enable listening without configuring nodes just
  load the frameworks/communication/listen script.

- If encrypted listening is desired set the following:
	redef Communication::listen_encrypted=T;

- Accompanying test updates.
2011-10-07 13:29:26 -04:00
Robin Sommer
ea3dffa83c Fixing non-portable regexp match in test.
Also adding site/ to scripts excluded from bare mode check.
2011-10-06 19:04:03 -07:00
Jon Siwek
71dc6b6de3 Fixing unit tests. 2011-09-30 07:53:23 -05:00
Seth Hall
36dbaa5b92 Loaded scripts is indented with spaces now and makes more sense to look at.
- Updated a test to make it pass again.
2011-09-29 15:53:54 -04:00
Jon Siwek
a71ab223c4 Various unit test cleanup.
Updated README and collected coverage-related tests in a common dir.

There are still coverage failures resulting from either the following
scripts not being @load'd in the default bro mode:

base/frameworks/time-machine/notice.bro
base/protocols/http/partial-content.bro
base/protocols/rpc/main.bro

Or the following result in errors when @load'd:

policy/protocols/conn/scan.bro
policy/hot.conn.bro

If these are all scripts-in-progress, can we move them all to live
outside the main scripts/ directory until they're ready?
2011-09-27 12:41:30 -05:00