Verified Commit c4061f45 authored by Max Rees's avatar Max Rees

tests: fix newapkbuild tests

* Do not use the -n option for newapkbuild_simple_test: since commit
  a68354eb, this option is not allowed
  when providing PKGNAME[-PKGVER] (i.e. not SRCURL) as the final
  argument.
* Use newapkbuild from the working tree, not whatever is in $PATH.
parent 4184c42b
#!/bin/sh
#
# Test suite for abuild(1), newapkbuild(1), and friends
#
#
# Copyright (c) 2018, A. Wilcox <awilfox@adelielinux.org>
# Licensed under the GPL 2.0 only. No later version.
#
#####################################################################
# Ground rules:
#
#
# * Must be POSIX shell compatible (no bash / dash extensions)
# * Must test all common operations of newapkbuild
# (not necessarily every single kind of package, but common ones)
......@@ -143,7 +143,7 @@ newapkbuild_simple_test() {
shift
cd "tests/newapkbuild"
[ -d $name ] && rm -r $name
newapkbuild -n $name $@
../../newapkbuild $@
if [ $? -ne 0 ]; then
fail $name
cd "$OLDPWD"
......@@ -166,7 +166,7 @@ newapkbuild_simple_test simplever 'pkgver=1.0' simplever-1.0
newapkbuild_pkg_test() {
cd "tests/newapkbuild"
[ -d $1 ] && rm -r $1
newapkbuild "https://distfiles.adelielinux.org/source/newapkbuild-tests/$1-1.0.tar.xz" 1>/dev/null 2>/dev/null
../../newapkbuild "https://distfiles.adelielinux.org/source/newapkbuild-tests/$1-1.0.tar.xz" 1>/dev/null 2>/dev/null
cd "$OLDPWD"
if [ $? -ne 0 ]; then
fail "$1: newapkbuild failed"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment