File: install-force-test-fail

package info (click to toggle)
zkg 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,740 kB
  • sloc: python: 5,910; sh: 268; makefile: 265; cpp: 24
file content (19 lines) | stat: -rw-r--r-- 850 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# @TEST-DOC: Test that a failing test_command with --force causes zkg install to fail and the package is not loaded. Also, verify that --skiptests can override that.
# @TEST-REQUIRES: type zeek-config
#
# @TEST-EXEC: bash %INPUT

# @TEST-EXEC: echo "=== install without skiptests" >>out
# @TEST-EXEC-FAIL: zkg install --force foo >>out 2>&1
# @TEST-EXEC: echo "have_load_foo=$(grep -c '@load.*foo' ./scripts/packages/packages.zeek)" >>out
#
# @TEST-EXEC: rm -rf ./state
# @TEST-EXEC: echo "=== install with skiptests" >>out
# @TEST-EXEC: zkg install --force --skiptests foo >>out 2>&1
# @TEST-EXEC: echo "have_load_foo=$(grep -c '@load.*foo' ./scripts/packages/packages.zeek)" >>out
#
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out

cd packages/foo
echo 'test_command = exit 1' >> zkg.meta
git commit -am 'add a test'