From 92533beae08fb440625f7ef79ed19226a9bc2e71 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 15 Jun 2010 15:14:18 +0000 Subject: test: dont run sh manually but respect #!/bin/sh in each test That way we can set sh options case by case --- test/.gitignore | 2 ++ test/Makefile | 7 ++++--- test/test1.sh | 2 +- test/test2.sh | 2 +- test/test3.sh | 2 +- test/test4.sh | 2 +- test/test5.sh | 2 +- test/test6.sh | 2 +- test/test7.sh | 2 +- 9 files changed, 13 insertions(+), 10 deletions(-) (limited to 'test') 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 -- cgit v1.2.3-70-g09d2