Commit cb1c4c5b authored by Assam Boudjelthia's avatar Assam Boudjelthia
Browse files

Add test data as resources which enables all tests on Android



Also, move the test data to "data" folder as a pass by.

Pick-to: 6.2 6.3
Task-number: QTBUG-88846
Change-Id: I5843afe8ed7b886f32bbe8de843bda04afaf3b6f
Reviewed-by: default avatarQt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: default avatarIvan Solovev <ivan.solovev@qt.io>
parent 2ecdc271
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
data/*)
list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_ellipse
SOURCES
tst_bmellipse.cpp
......@@ -6,4 +12,5 @@ qt_internal_add_test(tst_ellipse
Qt::GuiPrivate
Qt::Test
Qt::BodymovinPrivate
TESTDATA ${test_data}
)
......@@ -268,7 +268,7 @@ void tst_BMEllipse::loadTestData(const QByteArray &filename)
m_ellipse = nullptr;
}
QFile sourceFile(QFINDTESTDATA(filename.constData()));
QFile sourceFile(QFINDTESTDATA(QLatin1String("data/") + filename));
if (!sourceFile.exists())
QFAIL("File does not exist");
if (!sourceFile.open(QIODevice::ReadOnly))
......
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
data/*)
list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_fill
SOURCES
tst_bmfill.cpp
......@@ -6,4 +12,5 @@ qt_internal_add_test(tst_fill
Qt::GuiPrivate
Qt::Test
Qt::BodymovinPrivate
TESTDATA ${test_data}
)
......@@ -189,7 +189,7 @@ void tst_BMFill::loadTestData(const QByteArray &filename)
m_fill = nullptr;
}
QFile sourceFile(QFINDTESTDATA(filename.constData()));
QFile sourceFile(QFINDTESTDATA(QLatin1String("data/") + filename));
if (!sourceFile.exists())
QFAIL("File does not exist");
if (!sourceFile.open(QIODevice::ReadOnly))
......
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
data/*)
list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_path
SOURCES
tst_bmpath.cpp
......@@ -6,4 +12,5 @@ qt_internal_add_test(tst_path
Qt::GuiPrivate
Qt::Test
Qt::BodymovinPrivate
TESTDATA ${test_data}
)
Supports Markdown
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