Skip to content

Commit

Permalink
Confine get-zeek-env zeek_plugin_path to /build
Browse files Browse the repository at this point in the history
Closes #25
  • Loading branch information
awelzel committed Nov 7, 2023
1 parent ca941b2 commit cb9f135
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/testing/Scripts/get-zeek-env
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ else
elif [ "$1" = "zeek_plugin_path" ]; then
# Combine the local tree and the system-wide path. This allows
# us to test on a local build or an installation made via zkg,
# which squirrels away the build. --cpk
echo "$(cd "${base}/../.." && pwd):$(zeek-config --plugin_dir)"
# which squirrels away the build.
echo "$(cd "${base}/../.." && pwd)/build:$(zeek-config --plugin_dir)"
elif [ "$1" = "path" ]; then
echo "${PATH}"
else
Expand Down
12 changes: 12 additions & 0 deletions tests/features/plugin-zeek-plugin-path-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @TEST-DOC: Verify ZEEK_PLUGIN_PATH is confined to ./build and testing with ./build moved to ./build-backup fails.
#
# @TEST-REQUIRES: make --version
# @TEST-REQUIRES: cmake --help | grep -q '^* Unix Makefiles'
#
# @TEST-EXEC: ${SCRIPTS}/zkg create --packagedir=test --features plugin --user-var name=Name --user-var namespace=Namespace
# @TEST-EXEC: cd test && ./configure 1>&2
# @TEST-EXEC: make -C test/build/ -j`nproc` 1>&2
# @TEST-EXEC: mv test/build test/build-backup
# @TEST-EXEC-FAIL: btest -djc test/testing/btest.cfg
# @TEST-EXEC: mv test/build-backup test/build
# @TEST-EXEC: btest -djc test/testing/btest.cfg

0 comments on commit cb9f135

Please sign in to comment.