mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
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.
This commit is contained in:
parent
9e5e9d04b7
commit
7e9d48f532
549 changed files with 89909 additions and 100 deletions
61
testing/scripts/gen-broxygen-docs.sh
Executable file
61
testing/scripts/gen-broxygen-docs.sh
Executable file
|
@ -0,0 +1,61 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
unset BRO_DISABLE_BROXYGEN
|
||||
|
||||
# If running this from btest, unset any of the environment
|
||||
# variables that alter default script values.
|
||||
unset BRO_DEFAULT_LISTEN_ADDRESS
|
||||
unset BRO_DEFAULT_LISTEN_RETRY
|
||||
unset BRO_DEFAULT_CONNECT_RETRY
|
||||
|
||||
dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||
source_dir=$dir/../..
|
||||
build_dir=$source_dir/build
|
||||
conf_file=$build_dir/broxygen-test.conf
|
||||
output_dir=$source_dir/doc
|
||||
bro_error_file=$build_dir/broxygen-test-stderr.txt
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
output_dir=$1
|
||||
fi
|
||||
|
||||
case $output_dir in
|
||||
/*) ;;
|
||||
*) output_dir=`pwd`/$output_dir ;;
|
||||
esac
|
||||
|
||||
cd $build_dir
|
||||
. bro-path-dev.sh
|
||||
export BRO_SEED_FILE=$source_dir/testing/btest/random.seed
|
||||
|
||||
function run_bro
|
||||
{
|
||||
bro -X $conf_file broxygen >/dev/null 2>$bro_error_file
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed running bro with broxygen config file $conf_file"
|
||||
echo "See stderr in $bro_error_file"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
scripts_output_dir=$output_dir/scripts
|
||||
rm -rf $scripts_output_dir
|
||||
printf "script\t*\t$scripts_output_dir/" > $conf_file
|
||||
echo "Generating $scripts_output_dir/"
|
||||
run_bro
|
||||
|
||||
script_ref_dir=$output_dir/script-reference
|
||||
mkdir -p $script_ref_dir
|
||||
|
||||
function generate_index
|
||||
{
|
||||
echo "Generating $script_ref_dir/$2"
|
||||
printf "$1\t*\t$script_ref_dir/$2\n" > $conf_file
|
||||
run_bro
|
||||
}
|
||||
|
||||
generate_index "script_index" "autogenerated-script-index.rst"
|
||||
generate_index "package_index" "autogenerated-package-index.rst"
|
||||
generate_index "file_analyzer" "autogenerated-file-analyzer-index.rst"
|
||||
generate_index "proto_analyzer" "autogenerated-protocol-analyzer-index.rst"
|
Loading…
Add table
Add a link
Reference in a new issue