mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-26 19:40:24 +00:00
build-test-tarball.mk.in : Add a Make script to build a tarball of all the test binaries and the test wrapper script.
This commit is contained in:
parent
6a6d088305
commit
2e4c8c26a0
@ -33,6 +33,7 @@ Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
build-test-tarball.mk
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
@ -48,6 +49,7 @@ examples/sfprocess
|
||||
examples/sndfile-to-text
|
||||
examples/sndfilehandle
|
||||
libsndfile-1.0.*
|
||||
libsndfile-testsuite-*
|
||||
libsndfile.spec
|
||||
libtool
|
||||
mntest.sh
|
||||
|
@ -4,6 +4,12 @@
|
||||
Update to allow all tests to be gathered up into a testsuite tarball and
|
||||
then be run using this script.
|
||||
|
||||
* build-test-tarball.mk.in
|
||||
Add a Make script to build a tarball of all the test binaries and the test
|
||||
wrapper script. This is useful for cross compiling; you can build the
|
||||
binaries, build test test tarball and transfer the test tarball to the
|
||||
target machine for testing.
|
||||
|
||||
2009-09-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h src/*.c
|
||||
|
@ -25,3 +25,5 @@ genfiles :
|
||||
(cd tests ; make genfiles)
|
||||
|
||||
|
||||
test-tarball : build-test-tarball.mk
|
||||
make -f build-test-tarball.mk
|
||||
|
51
build-test-tarball.mk.in
Normal file
51
build-test-tarball.mk.in
Normal file
@ -0,0 +1,51 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# This is probably only going to work with GNU Make.
|
||||
# This in a separate file instead of in Makefile.am because Automake complains
|
||||
# about the GNU Make-isms.
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
|
||||
HOST_TRIPLET = @HOST_TRIPLET@
|
||||
|
||||
LIB_VERSION := $(shell echo $(PACKAGE_VERSION) | sed -e 's/[a-z].*//')
|
||||
|
||||
TESTNAME = libsndfile-testsuite-$(HOST_TRIPLET)-$(PACKAGE_VERSION)
|
||||
|
||||
TARBALL = $(TESTNAME).tar.gz
|
||||
|
||||
# Find the test programs by grepping the script for the programs it executes.
|
||||
testprogs := $(shell grep '^\./' tests/test_wrapper.sh | sed -e "s|./||" -e "s/ .*//" | sort | uniq)
|
||||
# Also add the programs not found by the above.
|
||||
testprogs += sfversion@EXEEXT@ stdin_test@EXEEXT@ stdout_test@EXEEXT@
|
||||
|
||||
# Find the single test program in src/ .
|
||||
srcprogs := $(shell if test -x src/.libs/test_main$(EXEEXT) ; then echo "src/.libs/test_main$(EXEEXT)" ; else echo "src/test_main$(EXEEXT)" ; fi)
|
||||
|
||||
libfiles := $(shell if test ! -z $(EXEEXT) ; then echo "src/libsndfile-1.def src/.libs/libsndfile-1.dll" ; else echo "src/.libs/libsndfile.so.$(LIB_VERSION)" ; fi)
|
||||
|
||||
files := $(addprefix tests/.libs/,$(subst @EXEEXT@,$(EXEEXT),$(testprogs))) $(libfiles) $(srcprogs)
|
||||
|
||||
|
||||
all : $(TARBALL)
|
||||
|
||||
clean :
|
||||
rm -rf $(TARBALL) $(TESTNAME)/
|
||||
|
||||
check : $(TESTNAME)/test_wrapper.sh
|
||||
(cd ./$(TESTNAME)/ && ./test_wrapper.sh)
|
||||
|
||||
$(TARBALL) : $(TESTNAME)/test_wrapper.sh
|
||||
tar zcf $@ $(TESTNAME)
|
||||
|
||||
$(TESTNAME)/test_wrapper.sh : tests/test_wrapper.sh
|
||||
rm -rf $(TESTNAME)
|
||||
mkdir -p $(TESTNAME)/tests/
|
||||
cp $(files) $(TESTNAME)/tests/
|
||||
cp $+ $(TESTNAME)/
|
||||
chmod u+x $@
|
||||
|
||||
tests/test_wrapper.sh : tests/test_wrapper.sh.in
|
||||
(cd tests/ ; make $@)
|
11
configure.ac
11
configure.ac
@ -584,8 +584,12 @@ if test x"$CFLAGS" = x ; then
|
||||
exit
|
||||
fi
|
||||
|
||||
HOST_TRIPLET="${host_cpu}-${host_vendor}-${host_os}"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
AC_SUBST(HOST_TRIPLET)
|
||||
|
||||
AC_SUBST(htmldocdir)
|
||||
AC_SUBST(HTML_BGCOLOUR)
|
||||
AC_SUBST(HTML_FGCOLOUR)
|
||||
@ -614,12 +618,12 @@ AC_CONFIG_FILES([ \
|
||||
M4/Makefile doc/Makefile Win32/Makefile Octave/Makefile \
|
||||
programs/Makefile doc/libsndfile.css \
|
||||
Makefile libsndfile.spec sndfile.pc \
|
||||
tests/test_wrapper.sh \
|
||||
tests/test_wrapper.sh build-test-tarball.mk \
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
# Make it executable.
|
||||
chmod u+x tests/test_wrapper.sh
|
||||
# Make sure these are executable.
|
||||
chmod u+x tests/test_wrapper.sh build-test-tarball.mk
|
||||
|
||||
#====================================================================================
|
||||
|
||||
@ -639,6 +643,7 @@ AC_MSG_RESULT([
|
||||
External FLAC/Ogg/Vorbis : ............ ${enable_external_libs:-no}
|
||||
])
|
||||
|
||||
|
||||
if test x$ac_cv_c_compiler_gnu = xyes ; then
|
||||
echo -e " Tools :\n"
|
||||
echo " Compiler is GCC : ..................... ${ac_cv_c_compiler_gnu}"
|
||||
|
Loading…
Reference in New Issue
Block a user