mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge branch 'topic/christian/zeekygen-add-plugin-labels'
* topic/christian/zeekygen-add-plugin-labels: Bump doc to pull in Sphinx exclusion for autogenerated files Remove long-unused BRO_DISABLE_BROXYGEN env var from btests Add Sphinx label to Zeekygen-generated plugin docs
This commit is contained in:
commit
1e52f173ba
17 changed files with 36 additions and 17 deletions
8
CHANGES
8
CHANGES
|
@ -1,3 +1,11 @@
|
|||
5.1.0-dev.428 | 2022-08-22 14:16:59 -0700
|
||||
|
||||
* Bump doc to pull in Sphinx exclusion for autogenerated files (Christian Kreibich, Corelight)
|
||||
|
||||
* Remove long-unused BRO_DISABLE_BROXYGEN env var from btests (Christian Kreibich, Corelight)
|
||||
|
||||
* Add Sphinx label to Zeekygen-generated plugin docs (Christian Kreibich, Corelight)
|
||||
|
||||
5.1.0-dev.424 | 2022-08-22 10:56:47 -0700
|
||||
|
||||
* Merge branch 'topic/timw/parse-packet-results' (Tim Wojtulewicz, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
5.1.0-dev.424
|
||||
5.1.0-dev.428
|
||||
|
|
2
doc
2
doc
|
@ -1 +1 @@
|
|||
Subproject commit 8842cd14a1e02941f87e73f2f7860211a123b4a0
|
||||
Subproject commit 2cbd8dd85f8baf5b5658a231d26768afd8f08c06
|
|
@ -6,6 +6,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <regex>
|
||||
|
||||
#include "zeek/Reporter.h"
|
||||
#include "zeek/analyzer/Component.h"
|
||||
|
@ -28,6 +29,16 @@ static void write_plugin_section_heading(FILE* f, const plugin::Plugin* p)
|
|||
{
|
||||
const string& name = p->Name();
|
||||
|
||||
// A label-safe version of the plugin name: replace _ and : with -, turn
|
||||
// sequences of - into single ones, and make lower-case. Example:
|
||||
// "Zeek::IEEE802_11" -> "zeek-ieee802-11".
|
||||
auto flags = std::regex_constants::match_any;
|
||||
string label_name = std::regex_replace(name, std::regex("[_:]"), "-", flags);
|
||||
label_name = std::regex_replace(label_name, std::regex("-+"), "-", flags);
|
||||
label_name = zeek::util::strtolower(label_name);
|
||||
|
||||
fprintf(f, ".. _plugin-%s:\n\n", label_name.c_str());
|
||||
|
||||
fprintf(f, "%s\n", name.c_str());
|
||||
for ( size_t i = 0; i < name.size(); ++i )
|
||||
fprintf(f, "-");
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
# Shouldn't emit any warnings about not being able to document something
|
||||
# that's supplied via command line script.
|
||||
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek %INPUT -e 'redef myvar=10; print myvar' >output 2>&1
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -e '@load %INPUT print myvar' >>output 2>&1
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek %INPUT -e 'module mymodule; print myvar' >>output 2>&1
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek %INPUT -e 'redef myvar=10; print myvar' >output 2>&1
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -e '@load %INPUT print myvar' >>output 2>&1
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek %INPUT -e 'module mymodule; print myvar' >>output 2>&1
|
||||
# @TEST-EXEC: btest-diff output
|
||||
|
||||
const myvar = 5 &redef;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b %INPUT >out
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
##! This is a test script.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff autogen-reST-enums.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: btest-diff example.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff autogen-reST-func-params.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# @TEST-PORT: BROKER_PORT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT Broker::default_port=$BROKER_PORT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT Broker::default_port=$BROKER_PORT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff test.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# @TEST-PORT: BROKER_PORT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT Broker::default_port=$BROKER_PORT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT Broker::default_port=$BROKER_PORT
|
||||
# @TEST-EXEC: btest-diff test.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# @TEST-PORT: BROKER_PORT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT Broker::default_port=$BROKER_PORT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT Broker::default_port=$BROKER_PORT
|
||||
# @TEST-EXEC: btest-diff test.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff autogen-reST-records.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# @TEST-PORT: BROKER_PORT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT Broker::default_port=$BROKER_PORT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT Broker::default_port=$BROKER_PORT
|
||||
# @TEST-EXEC: btest-diff test.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# @TEST-PORT: BROKER_PORT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT Broker::default_port=$BROKER_PORT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT Broker::default_port=$BROKER_PORT
|
||||
# @TEST-EXEC: btest-diff test.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff autogen-reST-type-aliases.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; unset BRO_DISABLE_BROXYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff autogen-reST-vectors.rst
|
||||
|
||||
@TEST-START-FILE zeekygen.config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue