test: dont run sh manually but respect #!/bin/sh in each test

That way we can set sh options case by case
cute-signatures
Natanael Copa 2010-06-15 15:14:18 +00:00
parent 2dd7ad9a9b
commit 92533beae0
9 changed files with 13 additions and 10 deletions

2
test/.gitignore vendored
View File

@ -2,3 +2,5 @@ src
pkg
*.apk
*.tar.gz
conf.mk

View File

@ -1,3 +1,4 @@
-include conf.mk
repos := repo1 repo2
@ -6,8 +7,8 @@ testroot = $(tmproot)/$(basename $@)
SUDO := sudo
APK := ../src/apk --keys-dir /etc/apk/keys
#SYSREPO ?= http://alpinelinux.org/cgi-bin/dl.cgi/edge/main
SYSREPO ?= http://192.168.8.4/main
SYSREPO ?= http://alpinelinux.org/cgi-bin/dl.cgi/edge/main
LD_LIBRARY_PATH = ../src
export LD_LIBRARY_PATH SYSREPO
@ -41,7 +42,7 @@ repos.stamp: $(repos)
@echo -n "$<"; \
rm -rf "$(testroot)" ;\
mkdir -p "$(testroot)"; \
if ! APK="$(APK)" ROOT="$(testroot)" SYSREPO="$(SYSREPO)" sh -e $< > $(basename $@).out 2>&1; then\
if ! APK="$(APK)" ROOT="$(testroot)" SYSREPO="$(SYSREPO)" ./$< > $(basename $@).out 2>&1; then\
echo " FAIL";\
exit 1;\
fi ;\

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -e
# desc: test if basic add/del/upgrade works

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -e
# desc: test if dependencies works

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -e
# desc: test successful pre-install

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -e
# desc: test failing pre-install

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -e
# desc: test post-install script

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -e
# desc: test triggers in kernel package

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -e
# desc: test triggers in busybox package