apk-tools/test/test4.sh
Jakub Jirutka fd8d3738fe test: fix test4.sh, script failure is non-fatal
This behaviour has been changed in: 7d5cd2c8a0.
2017-06-11 12:27:00 +02:00

17 lines
377 B
Bash
Executable file

#!/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