Skip to content

Commit

Permalink
add COWDANCER_SO env-var, and make testing functionality available fo…
Browse files Browse the repository at this point in the history
…r inside chroot.
  • Loading branch information
dancerj committed Apr 12, 2009
1 parent 257a6ad commit 65d14d3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PREFIX=/usr
LIBDIR=$(PREFIX)/lib
CFLAGS=-O2 -Wall -g -fno-strict-aliasing -D_REENTRANT
CFLAGS_LFS=$(CFLAGS) $(shell getconf LFS_CFLAGS)
PWD=$(shell pwd)

export VERSION=$(shell sed -n '1s/.*(\(.*\)).*$$/\1/p' < debian/changelog )

Expand Down Expand Up @@ -74,7 +75,9 @@ slowcheck: cowdancer-ilistdump qemubuilder cow-shell
# FIXME: The tests are running installed cowdancer, not the just-built
set -e; set -o pipefail; for A in tests/[0-9][0-9][0-9]_*.sh; \
do echo $$A; \
PATH="$(PWD):$(PWD)/tests:/usr/bin/:/bin" bash $$A 2>&1 | \
PATH="$(PWD):$(PWD)/tests:/usr/bin/:/bin" \
COWDANCER_SO=$(PWD)/libcowdancer.so \
bash $$A 2>&1 | \
sed -e's,/tmp/[^/]*,/tmp/XXXX,g' \
-e "s,^Current time:.*,Current time: TIME," \
-e "s,^pbuilder-time-stamp: .*,pbuilder-time-stamp: XXXX," \
Expand Down
8 changes: 7 additions & 1 deletion cow-shell.1
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,14 @@ Utilized to preload

.TP
.B "COWDANCER_DEBUG"
Debugging option.
Enables debug messages.
cowdancer will give debug messages in standard error output.
cowdancer will give verbose debug messages in standard error output.

.TP
.B "COWDANCER_SO"
Debugging option.
Specifies a different path for libcowdancer.so.

.TP
.B "COWDANCER_REUSE=yes"
Expand Down
3 changes: 1 addition & 2 deletions cow-shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ int main(int ac, char** av)
asprintf(&buf, "%s%s%s",
getenv("LD_PRELOAD")?:"",
getenv("LD_PRELOAD")?" ":"",
LIBDIR "/cowdancer/libcowdancer.so"
);
getenv("COWDANCER_SO") ?: LIBDIR "/cowdancer/libcowdancer.so");

cowdancer_reuse=getenv("COWDANCER_REUSE") &&
!strcmp(getenv("COWDANCER_REUSE"),"yes") ;
Expand Down
1 change: 1 addition & 0 deletions cowdancer-ilistcreate.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const char* ilist_PRGNAME="cowdancer-ilistcreate";
int main(int argc, char** argv)
{
/*
Wrapper to invoke ilistcreate.
*/
if (argc != 3)
{
Expand Down
6 changes: 5 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ cowdancer (0.55) UNRELEASED; urgency=low

* COWDANCER_DEBUG=1 sent some output to stdout which broke some cases,
now outputs to stderr, which is more safe.
* Now make check runs.
* environment variable COWDANCER_SO specifies location of
libcowdancer.so, default is /usr/lib/cowdancer/libcowdancer.so,
useful for running tests on just-built cowdancer.

-- Junichi Uekawa <[email protected]> Sun, 12 Apr 2009 11:31:47 +0900
-- Junichi Uekawa <[email protected]> Sun, 12 Apr 2009 13:59:21 +0900

cowdancer (0.54) unstable; urgency=low

Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ build: configure-stamp build-stamp
build-stamp:
dh_testdir
$(MAKE)
$(MAKE) fastcheck
$(MAKE) check
touch build-stamp

clean:
Expand Down

0 comments on commit 65d14d3

Please sign in to comment.