summaryrefslogtreecommitdiff
path: root/test/test4.sh
blob: 5a1c8ff81e6b847f8e9f23195d1f9ed3f1d4c0d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh -e

# desc: test failing pre-install

# pre-install script will fail if should-fail file exists
mkdir -p "$ROOT"
touch "$ROOT"/should-fail

! $APK add --root $ROOT --initdb --repository $PWD/repo1 --repository $SYSREPO \
	-U test-c

# check that pre-install was executed
test -f $ROOT/pre-install

# check that package was installed
$APK info --root $ROOT -e test-c