mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Add test creating multiple plugins with load dependencies.
If we load plugins purely alphabetically, the 1st Zeek run in the test will success while the 2nd will fail.
This commit is contained in:
parent
f70a7cb4d3
commit
3ebfcdf0ae
9 changed files with 167 additions and 0 deletions
31
testing/btest/plugins/plugin-load-dependency.zeek
Normal file
31
testing/btest/plugins/plugin-load-dependency.zeek
Normal file
|
@ -0,0 +1,31 @@
|
|||
# @TEST-EXEC: mkdir 1
|
||||
# @TEST-EXEC: cd 1 && ${DIST}/auxil/zeek-aux/plugin-support/init-plugin -u . Testing Plugin1
|
||||
# @TEST-EXEC: cp -r %DIR/plugin-load-dependency/1 .
|
||||
# @TEST-EXEC: cd 1 && ./configure --zeek-dist=${DIST} && make
|
||||
|
||||
# @TEST-EXEC: mkdir 2
|
||||
# @TEST-EXEC: cd 2 && ${DIST}/auxil/zeek-aux/plugin-support/init-plugin -u . Testing Plugin2
|
||||
# @TEST-EXEC: cp -r %DIR/plugin-load-dependency/2 .
|
||||
# @TEST-EXEC: cd 2 && ./configure --zeek-dist=${DIST} && make
|
||||
|
||||
# @TEST-EXEC: mkdir 3
|
||||
# @TEST-EXEC: cd 3 && ${DIST}/auxil/zeek-aux/plugin-support/init-plugin -u . Testing Plugin3
|
||||
# @TEST-EXEC: cp -r %DIR/plugin-load-dependency/3 .
|
||||
# @TEST-EXEC: cd 3 && ./configure --zeek-dist=${DIST} && make
|
||||
|
||||
# The following run will only work if Zeek loads plugin2 before plugin3 (which
|
||||
# by alphabetical loading will be the case)
|
||||
# @TEST-EXEC: ZEEK_PLUGIN_PATH=. zeek -b -N Testing::Plugin3 Testing::Plugin2 | grep -v Zeek:: | sort >> output
|
||||
#
|
||||
# @TEST-EXEC: echo >>output
|
||||
#
|
||||
# The following run will only work if Zeek loads plugin2 before plugin1 (which
|
||||
# by alphabetical loading will not be the case).
|
||||
# @TEST-EXEC: ZEEK_PLUGIN_PATH=. zeek -b -N Testing::Plugin1 Testing::Plugin2 | grep -v Zeek:: | sort >> output
|
||||
#
|
||||
# @TEST-EXEC: echo >>output
|
||||
#
|
||||
# Finally, try it with self-discovery of all three plugins too.
|
||||
# @TEST-EXEC: ZEEK_PLUGIN_PATH=. zeek -N | grep -v Zeek:: | sort >> output
|
||||
#
|
||||
# @TEST-EXEC: btest-diff output
|
Loading…
Add table
Add a link
Reference in a new issue