diff --git a/tests/testimage.jpg b/tests/images/testimage.jpg similarity index 100% rename from tests/testimage.jpg rename to tests/images/testimage.jpg diff --git a/tests/tests.pro b/tests/tests.pro index cff131b..5199009 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -1,4 +1,5 @@ TEMPLATE = app +TARGET = ut_nemo-transfer-engine DEPENDPATH += . INCLUDEPATH += . ../src ../lib @@ -30,8 +31,11 @@ LIBS += -lquillmetadata QT += testlib PATH = /opt/tests/nemo-transfer-engine -resources.files = testimage.jpg -resources.path = $$PATH + +test_def.files = tests.xml +test_def.path = $$PATH +resources.files = images/testimage.jpg +resources.path = $$PATH/images target.path = $$PATH -INSTALLS += target resources +INSTALLS += target resources test_def diff --git a/tests/tests.xml b/tests/tests.xml new file mode 100644 index 0000000..30e38ec --- /dev/null +++ b/tests/tests.xml @@ -0,0 +1,12 @@ + + + + Nemo Transfer Engine automatic tests + + Nemo Transfer Engine unit tests + + /opt/tests/nemo-transfer-engine/ut_nemo-transfer-engine + + + + diff --git a/tests/ut_imageoperation.cpp b/tests/ut_imageoperation.cpp index c2120f0..90cd7d0 100644 --- a/tests/ut_imageoperation.cpp +++ b/tests/ut_imageoperation.cpp @@ -95,10 +95,10 @@ void ut_imageoperation::testUniqueFilePath() void ut_imageoperation::testScale() { - QImage img("testimage.jpg"); + QImage img("images/testimage.jpg"); QVERIFY(!img.isNull()); - QString filePath("testimage.jpg"); + QString filePath("images/testimage.jpg"); QString target = ImageOperation::uniqueFilePath(filePath); @@ -136,8 +136,8 @@ void ut_imageoperation::testDropMetadata() // title description, but it contains the most essential fields related // to location and the author. // First make sure that there is metadata - QCOMPARE(QuillMetadata::canRead("testimage.jpg"), true); - QuillMetadata md("testimage.jpg"); + QCOMPARE(QuillMetadata::canRead("images/testimage.jpg"), true); + QuillMetadata md("images/testimage.jpg"); QCOMPARE(md.isValid(), true); QVariant creator = md.entry(QuillMetadata::Tag_Creator); @@ -155,7 +155,7 @@ void ut_imageoperation::testDropMetadata() QCOMPARE(lat.isNull(), false); QCOMPARE(lon.isNull(), false); - QString path = ImageOperation::removeImageMetadata("testimage.jpg"); + QString path = ImageOperation::removeImageMetadata("images/testimage.jpg"); QVERIFY(!path.isNull()); QCOMPARE(QFile::exists(path), true);