mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
Allow --parse-only to work with --usage-issues flag
Use of --parse-only would previously exit before --usage-issues had a chance to analyze scripts and report any discovered issues and it can be useful to combine both flags for checking scripts for mistakes without actually executing any code. This also improves the behavior of --parse-only in combination with reporting problems in signature files (previously, it exited before even reading them).
This commit is contained in:
parent
91dc6fbbb0
commit
ac0b09d1a4
6 changed files with 34 additions and 6 deletions
15
testing/btest/core/parse-only-signature-file-issues.zeek
Normal file
15
testing/btest/core/parse-only-signature-file-issues.zeek
Normal file
|
@ -0,0 +1,15 @@
|
|||
# @TEST-DOC: ``zeek -a`` should parse scripts and also still detect signature file issues.
|
||||
|
||||
# @TEST-EXEC-FAIL: zeek -b -a -s nope %INPUT >missing-sig-file 2>&1
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff missing-sig-file
|
||||
|
||||
# @TEST-EXEC-FAIL: zeek -b -a test.zeek >invalid-sig-file 2>&1
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff invalid-sig-file
|
||||
|
||||
@TEST-START-FILE test.zeek
|
||||
@load-sigs test.sig
|
||||
@TEST-END-FILE
|
||||
|
||||
@TEST-START-FILE test.sig
|
||||
invalid
|
||||
@TEST-END-FILE
|
Loading…
Add table
Add a link
Reference in a new issue