Commit e70713e5 authored by Sam Thursfield's avatar Sam Thursfield

functional-tests: Various Autotools fixes

parent 70296add
......@@ -436,6 +436,8 @@ if test "$native_win32" = "yes" ; then
AC_DEFINE(OS_WIN32, 1, [Define if we are on win32])
fi
AC_SUBST(FUNCTIONAL_TESTS_TRACKER_EXTRACT_PATH, "@top_builddir@/src/tracker-extract/tracker-extract")
AC_SUBST(FUNCTIONAL_TESTS_TRACKER_MINER_FS_PATH, "@top_builddir@/src/miners/fs/tracker-miner-fs")
AC_SUBST(FUNCTIONAL_TESTS_TRACKER_STORE_PATH, "${libexecdir}/tracker-store")
####################################################################
......
......@@ -13,7 +13,12 @@ config_DATA = \
config_SCRIPTS = \
__init__.py \
$(tests)
$(tests) \
400-extractor-metadata.py \
500-writeback.py \
501-writeback-details.py \
600-applications-camera.py \
601-applications-sync.py
tests = \
300-miner-basic-ops.py \
......@@ -21,18 +26,51 @@ tests = \
310-fts-basic.py \
311-fts-file-operations.py \
312-fts-stopwords.py \
400-extractor-metadata.py \
410-extractor-decorator.py
extractor_tests = \
$(srcdir)/test-extraction-data/audio/audio-test-1.expected.json \
$(srcdir)/test-extraction-data/audio/empty_albumi_song3.expected.json \
$(srcdir)/test-extraction-data/audio/audio-test-2.expected.json \
$(srcdir)/test-extraction-data/images/test-image-1.expected.json \
$(srcdir)/test-extraction-data/images/xmp-loaded-1.expected.json \
$(srcdir)/test-extraction-data/images/test-image-3.expected.json \
$(srcdir)/test-extraction-data/images/corrupted-image.expected.json \
$(srcdir)/test-extraction-data/images/test-iptcdata-records.expected.json \
$(srcdir)/test-extraction-data/images/roi2.expected.json \
$(srcdir)/test-extraction-data/images/test-image-4.expected.json \
$(srcdir)/test-extraction-data/images/test-image-2.expected.json \
$(srcdir)/test-extraction-data/images/comment-extension-block.expected.json \
$(srcdir)/test-extraction-data/images/roi.expected.json \
$(srcdir)/test-extraction-data/video/184505.expected.json \
$(srcdir)/test-extraction-data/video/video-1.expected.json \
$(srcdir)/test-extraction-data/video/video-2.expected.json \
$(srcdir)/test-extraction-data/playlists/playlist-test-1.expected.json \
$(srcdir)/test-extraction-data/office/office-doc.expected.json \
$(srcdir)/test-extraction-data/office/powerpoint.expected.json \
$(srcdir)/test-extraction-data/office/pdf-doc.expected.json
TEST_RUNNER = $(top_srcdir)/tests/functional-tests/test-runner.sh
functional-test: ${tests}
@set -e ; \
for test in ${tests} ; do \
export DCONF_PROFILE=$(abs_srcdir)/trackertest ; \
export TRACKER_EXTRACTORS_DIR=$(top_builddir)/src/tracker-extract; \
export LANG=en_US.UTF8 ; \
export TRACKER_EXTRACTORS_DIR=$(top_builddir)/src/tracker-extract/.libs; \
export TRACKER_EXTRACTOR_RULES_DIR=$(top_srcdir)/src/tracker-extract; \
export TRACKER_FUNCTIONAL_TEST_BUILD_DIR=$(top_builddir) ; \
export TRACKER_FUNCTIONAL_TEST_CONFIG=$(top_builddir)/tests/functional-tests/configuration.json ; \
$(TEST_RUNNER) python $(top_srcdir)/tests/functional-tests/$$test; \
done; \
for extractor_test in ${extractor_tests} ; do \
export DCONF_PROFILE=$(abs_srcdir)/trackertest ; \
export LANG=en_US.UTF8 ; \
export TRACKER_EXTRACTORS_DIR=$(top_builddir)/src/tracker-extract/.libs; \
export TRACKER_EXTRACTOR_RULES_DIR=$(top_srcdir)/src/tracker-extract; \
export TRACKER_FUNCTIONAL_TEST_BUILD_DIR=$(top_builddir) ; \
export TRACKER_FUNCTIONAL_TEST_CONFIG=$(top_builddir)/tests/functional-tests/configuration.json ; \
$(TEST_RUNNER) python $(top_srcdir)/tests/functional-tests/400-extractor-metadata.py $$extractor_test; \
done
EXTRA_DIST = \
......
......@@ -65,7 +65,8 @@ def expandvars (variable):
result = variable
for var, value in [("${datarootdir}", RAW_DATAROOT_DIR),
("${exec_prefix}", RAW_EXEC_PREFIX),
("${prefix}", PREFIX)]:
("${prefix}", PREFIX),
("@top_builddir@", TOP_BUILDDIR)]:
result = result.replace (var, value)
......@@ -76,6 +77,7 @@ def expandvars (variable):
PREFIX = config['PREFIX']
RAW_EXEC_PREFIX = config['RAW_EXEC_PREFIX']
RAW_DATAROOT_DIR = config['RAW_DATAROOT_DIR']
TOP_BUILDDIR = os.environ['TRACKER_FUNCTIONAL_TEST_BUILD_DIR']
TRACKER_EXTRACT_PATH = os.path.normpath(expandvars(config['TRACKER_EXTRACT_PATH']))
TRACKER_MINER_FS_PATH = os.path.normpath(expandvars(config['TRACKER_MINER_FS_PATH']))
......@@ -101,10 +103,5 @@ if TEST_TMP_DIR.startswith('/tmp'):
"ignored.")
BUILD_DIR = os.environ.get('TRACKER_FUNCTIONAL_TEST_BUILD_DIR')
def generated_ttl_dir():
if BUILD_DIR:
return os.path.join(BUILD_DIR, 'tests', 'functional-tests', 'ttl')
else:
return 'ttl'
return os.path.join(TOP_BUILD_DIR, 'tests', 'functional-tests', 'ttl')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment