diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-10-17 23:31:02 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-10-17 23:31:02 +0000 |
commit | d51febce3146aaf426f8700de01d6c5279de0a9d (patch) | |
tree | 68abf1c9b58597156135f763756d35b6a0403766 | |
parent | 68b3a1ba59306f1bb9cef3af74a472a5519acf32 (diff) | |
download | netpbm-mirror-d51febce3146aaf426f8700de01d6c5279de0a9d.tar.gz netpbm-mirror-d51febce3146aaf426f8700de01d6c5279de0a9d.tar.xz netpbm-mirror-d51febce3146aaf426f8700de01d6c5279de0a9d.zip |
Move test helper program 'testrandom' from buildtools directory to test directory. One reason is to fix parallel build break due to testrandom depending upon stuff in lib/ directory
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2018 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | GNUmakefile | 2 | ||||
-rw-r--r-- | buildtools/Makefile | 16 | ||||
-rwxr-xr-x | test/Execute-Tests | 24 | ||||
-rw-r--r-- | test/Makefile | 24 | ||||
-rw-r--r-- | test/testrandom.c (renamed from buildtools/testrandom.c) | 0 |
5 files changed, 40 insertions, 26 deletions
diff --git a/GNUmakefile b/GNUmakefile index c6077285..fec301d6 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -60,7 +60,7 @@ VPATH=.:$(SRCDIR) include $(BUILDDIR)/config.mk -PROG_SUBDIRS = converter analyzer editor generator other +PROG_SUBDIRS = converter analyzer editor generator other test PRODUCT_SUBDIRS = lib $(PROG_SUBDIRS) SUPPORT_SUBDIRS = urt buildtools diff --git a/buildtools/Makefile b/buildtools/Makefile index e90feeca..10ac1a58 100644 --- a/buildtools/Makefile +++ b/buildtools/Makefile @@ -8,24 +8,10 @@ include $(BUILDDIR)/config.mk MERGE_OBJECTS = -# These are programs that are used by the make files: -BUILDPROGS = libopt typegen endiangen - -# Ideally, this directory would not contain anything but build tools, which -# means they would all be built to run in the build environment, not the -# target environment. But we have no other convenient place for test tools, -# so we put them here and build them for the target environment. -TESTPROGS = testrandom - -PROGS = $(BUILDPROGS) $(TESTPROGS) +PROGS = libopt typegen endiangen all: $(PROGS) -PORTBINARIES = $(TESTPROGS) -BINARIES = $(PORTBINARIES) -OBJECTS = $(BINARIES:%=%.o) -SCRIPTS = - OMIT_BUILDTOOL_RULE = 1 include $(SRCDIR)/common.mk diff --git a/test/Execute-Tests b/test/Execute-Tests index c2fd9d52..7a1a3793 100755 --- a/test/Execute-Tests +++ b/test/Execute-Tests @@ -39,16 +39,10 @@ fi # export PBM_BINPREFIX="" export PBM_BINPREFIX=${PBM_TESTPREFIX} -# Add PBM_BINPREFIX to PATH. -# This is necessary for Netpbm programs that call other Netpbm programs. - -if [ ! -z $PBM_BINPREFIX ] - then - export PATH=${PBM_BINPREFIX}:$PATH -fi - -# Set srcdir, which is the directory which contains Execute-Tests -# (this script), Test-Order *.test and *.ok files. +# Set srcdir, which is the directory which contains Execute-Tests (this +# script), programs that run the test, including *.test and helpers that they +# invoke, the list of tests to run ('Test-Order'), and *.ok files that +# indicate the expected results of tests. srcdir=$(dirname $0) @@ -100,6 +94,16 @@ if [ ! -f ./testimg.ppm ] then cp -v ${srcdir}/testimg.ppm ./testimg.ppm fi +# Add PBM_BINPREFIX to PATH. +# This is necessary for Netpbm programs that call other Netpbm programs. + +if [ ! -z $PBM_BINPREFIX ] + then + export PATH=${PBM_BINPREFIX}:$PATH +fi + +export PATH=${srcdir}:$PATH + # Execute the tests, as described in the "Test-Order" file. # # Each test outputs a ".out" file, which is compared against a diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 00000000..4d44285f --- /dev/null +++ b/test/Makefile @@ -0,0 +1,24 @@ +ifeq ($(SRCDIR)x,x) + SRCDIR = $(CURDIR)/.. + BUILDDIR = $(SRCDIR) +endif +SUBDIR = test +VPATH = .:$(SRCDIR)/$(SUBDIR) +include $(BUILDDIR)/config.mk + +MERGE_OBJECTS = + +PROGS = testrandom + +all: $(PROGS) + +PORTBINARIES = testrandom +OBJECTS = $(PORTBINARIES:%=%.o) + +OMIT_TEST_RULE = 1 +include $(SRCDIR)/common.mk + +distclean clean: cleanlocal +.PHONY: cleanlocal +cleanlocal: + rm -f $(PROGS) diff --git a/buildtools/testrandom.c b/test/testrandom.c index 3f65f0d2..3f65f0d2 100644 --- a/buildtools/testrandom.c +++ b/test/testrandom.c |