X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=t%2Finstall.t;h=b1ae1138062011dbc3bf1cc0c63164c56adc9a3f;hb=2ff614ec6d395325275ba7950c48c3e2f2f7f830;hp=31fa2657c9492b062935afeb80370a08f66c6d1f;hpb=903da5cc8edf74516b98027fb67a25eb407c2f4d;p=zpackage diff --git a/t/install.t b/t/install.t index 31fa265..b1ae113 100755 --- a/t/install.t +++ b/t/install.t @@ -6,7 +6,7 @@ . tap.sh -plan 62 +plan 67 owner=$(id -un) group=$(id -gn) @@ -59,7 +59,7 @@ PF=$pkgid.zpm # install via syncfs # require zpm pkg -f $PF $pkgid status=installing -zpm syncfs -d $PF -R. $pkgid 2>&1 +zpm syncfs -d $PF -R. $pkgid 2>&1 | diagstdin okexit ran syncfs test -f bin/true @@ -78,7 +78,7 @@ require rm -rf bin # TODO should probably have merge set the status to merged by default require zpm init local.db -zpm install -R. -d local.db -f $PF $pkgid +zpm install -R. -d local.db -f $PF $pkgid 2>&1 | diagstdin #zpm list -f local.db -v | diagstdin okexit installed ns=$(zpm pkg -f local.db $pkgid status) @@ -105,7 +105,7 @@ if [ $? -ne 0 ]; then bailout add failed fi -zpm install -R. -d local.db -f $PF itest-2.0-1 +zpm install -R. -d local.db -f $PF itest-2.0-1 2>&1 | diagstdin okexit installed if [ $? -ne 0 ]; then cat test.out | diagstdin @@ -127,7 +127,7 @@ pkgid=itest-3.0-1 newpkg $pkgid /bin/true okexit setup package $pkgid PF=$pkgid.zpm -zpm install -R. -d local.db -f $PF $pkgid | diagstdin +zpm install -R. -d local.db -f $PF $pkgid 2>&1 | diagstdin okexit upgraded to $pkgid ns=$(zpm pkg -f local.db $pkgid status) @@ -145,7 +145,7 @@ newpkg $pkgid bin/sh okexit setup package $pkgid require rm bin/sh PF=$pkgid.zpm -zpm install -R. -d local.db -f $PF $pkgid | diagstdin +zpm install -R. -d local.db -f $PF $pkgid 2>&1 | diagstdin okexit installed $pkgid oktest -f bin/sh @@ -161,7 +161,7 @@ newpkg $pkgid bin/true okexit setup package $pkgid require mv bin/save bin/true PF=$pkgid.zpm -zpm install -R. -d local.db -f $PF $pkgid | diagstdin +zpm install -R. -d local.db -f $PF $pkgid 2>&1 | diagstdin okexit installed $pkgid rhash=$(zpm hash bin/true) okstreq "$rhash" "$nhash" "updated bin/true" @@ -210,6 +210,15 @@ tryrun zpm uninstall -R. -d local.db third-1.0-1 test -f bin/echo failsok bin/echo removed +pkgid=fifth-1.0-1 +PF=$pkgid.zpm +newpkg $pkgid /bin/head +#zpm list -f $PF 2>&1 | diagstdin +skiponfail 1 "can't create $pkgid" || { + tryrun zpm install -R. -d local.db -f $PF 2>/dev/null + okexit "install with implicit package id" +} + cd .. || bailout require rm -rf tmp