[tracker] functional-tests: Conditional compilation of the extraction tests



commit 7ec7377cb11fdafb6a52537e95adba113ddf21de
Author: Ivan Frade <ivan frade nokia com>
Date:   Mon Nov 8 14:05:19 2010 +0200

    functional-tests: Conditional compilation of the extraction tests
    
    Distribute extraction tests only when the required libraries are present

 .../test-extraction-data/Makefile.am               |    6 ++++-
 .../test-extraction-data/images/Makefile.am        |   22 +++++++++++++++----
 .../test-extraction-data/office/Makefile.am        |   21 +++++++++++++-----
 .../test-extraction-data/video/Makefile.am         |   15 ++++++++-----
 4 files changed, 46 insertions(+), 18 deletions(-)
---
diff --git a/tests/functional-tests/test-extraction-data/Makefile.am b/tests/functional-tests/test-extraction-data/Makefile.am
index 79fc68c..a199292 100644
--- a/tests/functional-tests/test-extraction-data/Makefile.am
+++ b/tests/functional-tests/test-extraction-data/Makefile.am
@@ -1,3 +1,7 @@
 include $(top_srcdir)/Makefile.decl
 
-SUBDIRS = audio images office video playlists
+SUBDIRS = audio images office video
+
+if HAVE_TOTEM_PL_PARSER
+SUBDIRS += playlists
+endif
\ No newline at end of file
diff --git a/tests/functional-tests/test-extraction-data/images/Makefile.am b/tests/functional-tests/test-extraction-data/images/Makefile.am
index 2d302b2..dad3567 100644
--- a/tests/functional-tests/test-extraction-data/images/Makefile.am
+++ b/tests/functional-tests/test-extraction-data/images/Makefile.am
@@ -3,17 +3,29 @@ include $(top_srcdir)/Makefile.decl
 imagestestdir = $(datadir)/tracker-tests/test-extraction-data/images
 
 imagestest_DATA =                                      \
-	test-image-1.jpg                               \
-	test-image-1.expected                          \
 	test-image-2.png                               \
-	test-image-2.expected                          \
-	test-image-3.tif                               \
-	test-image-3.expected                          \
+	test-image-2.expected                          
+
+if HAVE_LIBGIF
+imagestest_DATA += 				       \
 	xmp-loaded-1.gif                               \
 	xmp-loaded-1.expected                          \
 	comment-extension-block.expected	       \
 	comment-extension-block.gif		       \
 	corrupted-image.gif                    	       \
 	corrupted-image.expected
+endif
+
+if HAVE_LIBTIFF
+imagestest_DATA += 				       \
+	test-image-3.tif                               \
+	test-image-3.expected                          
+endif
+
+if HAVE_LIBJPEG
+imagestest_DATA +=					\
+	test-image-1.jpg                               	\
+	test-image-1.expected                          	
+endif	
 
 EXTRA_DIST = $(imagestest_DATA)
diff --git a/tests/functional-tests/test-extraction-data/office/Makefile.am b/tests/functional-tests/test-extraction-data/office/Makefile.am
index 669cd71..17b9980 100644
--- a/tests/functional-tests/test-extraction-data/office/Makefile.am
+++ b/tests/functional-tests/test-extraction-data/office/Makefile.am
@@ -2,12 +2,21 @@ include $(top_srcdir)/Makefile.decl
 
 officetestdir = $(datadir)/tracker-tests/test-extraction-data/office
 
-officetest_DATA =                                      \
-	office-doc.doc                                 \
-	office-doc.expected                            \
-	pdf-doc.pdf                                    \
-	pdf-doc.expected                               \
-	powerpoint.ppt                                 \
+# initialize variable for unconditional += appending
+officetest_DATA =                                      
+
+if HAVE_LIBGSF
+officetest_DATA +=					\
+	office-doc.doc                                 	\
+	office-doc.expected                            	\
+	powerpoint.ppt                                 	\
 	powerpoint.expected
+endif
+
+if HAVE_POPPLER
+officetest_DATA +=					\
+	pdf-doc.pdf                                    	\
+	pdf-doc.expected
+endif
 
 EXTRA_DIST = $(officetest_DATA)
diff --git a/tests/functional-tests/test-extraction-data/video/Makefile.am b/tests/functional-tests/test-extraction-data/video/Makefile.am
index 6f2a841..d387da1 100644
--- a/tests/functional-tests/test-extraction-data/video/Makefile.am
+++ b/tests/functional-tests/test-extraction-data/video/Makefile.am
@@ -1,13 +1,16 @@
 include $(top_srcdir)/Makefile.decl
 
-if DIST_FUNCTIONAL_TESTS
 videotestdir = $(datadir)/tracker-tests/test-extraction-data/video
 
-videotest_DATA =                                       \
-	video-1.mp4                                    \
-	video-1.expected                               \
-	video-2.mov                                    \
+videotest_DATA =
+
+# This should be GSTREAMER OR LIBXINE OR GSTREMER_HELIX OR USING_EXTERNAL_VIDEO_PLAYER
+if HAVE_GSTREAMER
+videotest_DATA +=                                       \
+	video-1.mp4                                    	\
+	video-1.expected                               	\
+	video-2.mov                                    	\
 	video-2.expected
+endif
 
 EXTRA_DIST = $(videotest_DATA)
-endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]