From 10f21d249fb30c468d1765679d803647b54e5ed6 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sat, 20 Oct 2012 04:13:58 +0000 Subject: [PATCH] Fix: #858. Download video data on demand. More discussion in issue report. --- CMakeLists.txt | 6 ++++-- config/Makefile.in | 8 +++++++- test/Makefile | 40 +++++++++++++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0104e666..259f4b39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -185,10 +185,12 @@ ENDIF() ## # tests -ADD_CUSTOM_TARGET(tests COMMAND make test "EXIV2_BINDIR=${CMAKE_BINARY_DIR}/bin" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test/" ) +ADD_CUSTOM_TARGET(tests COMMAND make test "EXIV2_BINDIR=${CMAKE_BINARY_DIR}/bin" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test/" ) +ADD_CUSTOM_TARGET(teste COMMAND make teste "EXIV2_BINDIR=${CMAKE_BINARY_DIR}/bin" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test/" ) +ADD_CUSTOM_TARGET(testv COMMAND make testv "EXIV2_BINDIR=${CMAKE_BINARY_DIR}/bin" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test/" ) ## -# support for test suite TODO: fixup for MSVC and think a bit more about this +# support for test suite TODO: fixup for MSVC and think a bit more before deploying this # ENABLE_TESTING() # INCLUDE(Dart) # ADD_TEST(tests bash -c "cd ${CMAKE_SOURCE_DIR}/test/ ; make EXIV2_BINDIR=${CMAKE_BINARY_DIR}/bin" ) diff --git a/config/Makefile.in b/config/Makefile.in index 885c1a3d..bcbd067e 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -54,7 +54,7 @@ ENABLE_XMP = @ENABLE_XMP@ .PHONY: all doc config samples xmpsdk \ mostlyclean clean distclean maintainer-clean \ - install uninstall tests + install uninstall tests teste testv all install: config/config.mk xmpsdk cd src && $(MAKE) $(MAKECMDGOALS) @@ -73,6 +73,12 @@ samples: config/config.mk tests: cd test && $(MAKE) test +teste: + cd test && $(MAKE) teste + +testv: + cd test && $(MAKE) testv + config: cd config && $(MAKE) -f config.make $(MAKECMDGOALS) diff --git a/test/Makefile b/test/Makefile index 78a32b9f..0ac3d20b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -54,12 +54,19 @@ SHELL = /bin/sh # ****************************************************************************** # Targets -.PHONY: all test clean distclean maintainer-clean +.PHONY: all test testv teste clean distclean maintainer-clean +## +# to save download time for simple build/test, we download video and eps data on demand +# TODO: remove data/eps from depot for the 0.24 release. +# If we remove it now, it'll break the test instructions on the web: +# http://www.exiv2.org/download.html +SVN = svn://dev.exiv2.org/svn/testdata/trunk + +## # Add test drivers to this list TESTS = addmoddel.sh \ bugfixes-test.sh \ - eps-test.sh \ exifdata-test.sh \ exiv2-test.sh \ imagetest.sh \ @@ -73,8 +80,9 @@ TESTS = addmoddel.sh \ write-test.sh \ write2-test.sh \ xmpparser-test.sh \ - conversions.sh \ - video-test.sh + conversions.sh +TESTV = video-test.sh +TESTE = eps-test.sh test: @list='$(TESTS)'; for p in $$list; do \ @@ -82,8 +90,27 @@ test: ./$$p; \ done +testv: + @for t in /video ; do \ + if [ ! -e data/$$t ]; then \ + echo svn export '$(SVN)'$$t data$$t ; \ + svn export '$(SVN)'$$t data$$t ; \ + fi ; done + @list='$(TESTV)'; for p in $$list; do \ + echo Running $$p ...; \ + ./$$p; \ + done + +## +# TODO: download eps data on demand for 0.24 (similar to testv) +teste: + @list='$(TESTE)'; for p in $$list; do \ + echo Running $$p ...; \ + ./$$p; \ + done + clean: - rm -rf $(top_srcdir)/test/tmp/* + rm -rf $(top_srcdir)/test/tmp/* data/video data/eps distclean: clean $(RM) *~ *.bak *# @@ -91,3 +118,6 @@ distclean: clean # This command is intended for maintainers to use; it deletes files # that may need special tools to rebuild. maintainer-clean: distclean + +# That's all Folks! +## \ No newline at end of file