summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-06-15 15:14:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-06-15 15:53:32 +0000
commit92533beae08fb440625f7ef79ed19226a9bc2e71 (patch)
treeb543ab79257fb7ff05770192caaacef6bbb78de3
parent2dd7ad9a9b9d34bb577da4365569f4f56256d0e5 (diff)
downloadapk-tools-92533beae08fb440625f7ef79ed19226a9bc2e71.tar.gz
apk-tools-92533beae08fb440625f7ef79ed19226a9bc2e71.tar.bz2
apk-tools-92533beae08fb440625f7ef79ed19226a9bc2e71.tar.xz
apk-tools-92533beae08fb440625f7ef79ed19226a9bc2e71.zip
test: dont run sh manually but respect #!/bin/sh in each test
That way we can set sh options case by case
-rw-r--r--test/.gitignore2
-rw-r--r--test/Makefile7
-rwxr-xr-xtest/test1.sh2
-rwxr-xr-xtest/test2.sh2
-rwxr-xr-xtest/test3.sh2
-rwxr-xr-xtest/test4.sh2
-rwxr-xr-xtest/test5.sh2
-rwxr-xr-xtest/test6.sh2
-rwxr-xr-xtest/test7.sh2
9 files changed, 13 insertions, 10 deletions
diff --git a/test/.gitignore b/test/.gitignore
index 1480a73..c422ef7 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -2,3 +2,5 @@ src
pkg
*.apk
*.tar.gz
+conf.mk
+
diff --git a/test/Makefile b/test/Makefile
index 23f3183..417ed1a 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -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 ;\
diff --git a/test/test1.sh b/test/test1.sh
index ce28a05..12de8a8 100755
--- a/test/test1.sh
+++ b/test/test1.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
# desc: test if basic add/del/upgrade works
diff --git a/test/test2.sh b/test/test2.sh
index f0ba463..851119b 100755
--- a/test/test2.sh
+++ b/test/test2.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
# desc: test if dependencies works
diff --git a/test/test3.sh b/test/test3.sh
index 994d54d..421d576 100755
--- a/test/test3.sh
+++ b/test/test3.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
# desc: test successful pre-install
diff --git a/test/test4.sh b/test/test4.sh
index 8132c60..d08b45f 100755
--- a/test/test4.sh
+++ b/test/test4.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
# desc: test failing pre-install
diff --git a/test/test5.sh b/test/test5.sh
index ab9643a..ea3dd53 100755
--- a/test/test5.sh
+++ b/test/test5.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
# desc: test post-install script
diff --git a/test/test6.sh b/test/test6.sh
index dff4ee9..6c8d28e 100755
--- a/test/test6.sh
+++ b/test/test6.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
# desc: test triggers in kernel package
diff --git a/test/test7.sh b/test/test7.sh
index a742fbc..e3e3113 100755
--- a/test/test7.sh
+++ b/test/test7.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
# desc: test triggers in busybox package