tests: remove testsdata symlinks

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers 2026-02-23 12:32:05 -07:00
parent 4ed77a940c
commit 8855e16230
No known key found for this signature in database
GPG key ID: B4CB507E51F8B89C
21 changed files with 50 additions and 50 deletions

View file

@ -132,7 +132,7 @@ jobs:
- name: Run tests
run: |
ctest --preset "$CMAKE_PRESET" --build-config "$BUILD_TYPE" --extra-verbose --output-on-failure
ctest --preset "$CMAKE_PRESET" --build-config "$BUILD_TYPE"
##
# PACKAGE

View file

@ -105,7 +105,7 @@
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"configurePreset": "macos"
"configurePreset": "macos"
},
{
"name": "macos_universal",
@ -141,7 +141,8 @@
"name": "base",
"hidden": true,
"output": {
"outputOnFailure": true
"outputOnFailure": true,
"verbosity": "extra"
},
"execution": {
"noTestsAction": "error"
@ -152,11 +153,11 @@
}
}
},
{
"name": "linux",
{
"name": "linux",
"displayName": "Linux",
"inherits": [
"base"
"base"
],
"condition": {
"type": "equals",
@ -165,11 +166,11 @@
},
"configurePreset": "linux"
},
{
"name": "macos",
{
"name": "macos",
"displayName": "macOS",
"inherits": [
"base"
"base"
],
"condition": {
"type": "equals",
@ -178,11 +179,11 @@
},
"configurePreset": "macos"
},
{
"name": "macos_universal",
{
"name": "macos_universal",
"displayName": "macOS (Universal Binary)",
"inherits": [
"base"
"base"
],
"condition": {
"type": "equals",
@ -191,11 +192,11 @@
},
"configurePreset": "macos_universal"
},
{
"name": "windows_mingw",
{
"name": "windows_mingw",
"displayName": "Windows (MinGW)",
"inherits": [
"base"
"base"
],
"condition": {
"type": "equals",
@ -204,11 +205,11 @@
},
"configurePreset": "windows_mingw"
},
{
"name": "windows_msvc",
{
"name": "windows_msvc",
"displayName": "Windows (MSVC)",
"inherits": [
"base"
"base"
],
"condition": {
"type": "equals",

View file

@ -73,7 +73,7 @@ class LibraryTest : public QObject {
{
cache.reset(new HttpMetaCache());
cache->addBase("libraries", QDir("libraries").absolutePath());
dataDir = QDir(QFINDTESTDATA("testdata/Library")).absolutePath();
dataDir = QDir(QFINDTESTDATA("testdata/Libraries")).absolutePath();
}
void test_legacy()
{
@ -119,14 +119,14 @@ class LibraryTest : public QObject {
QCOMPARE(test.isNative(), false);
QStringList failedFiles;
test.setHint("local");
auto downloads = test.getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
auto downloads = test.getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Libraries"));
QCOMPARE(downloads.size(), 0);
qDebug() << failedFiles;
QCOMPARE(failedFiles.size(), 0);
QStringList jar, native, native32, native64;
test.getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
QCOMPARE(jar, { QFileInfo(QFINDTESTDATA("testdata/Library/codecwav-20101023.jar")).absoluteFilePath() });
test.getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Libraries"));
QCOMPARE(jar, { QFileInfo(QFINDTESTDATA("testdata/Libraries/codecwav-20101023.jar")).absoluteFilePath() });
QCOMPARE(native, {});
QCOMPARE(native32, {});
QCOMPARE(native64, {});
@ -217,22 +217,23 @@ class LibraryTest : public QObject {
test.setRepositoryURL("file://foo/bar");
{
QStringList jar, native, native32, native64;
test.getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
test.getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Libraries"));
QCOMPARE(jar, {});
QCOMPARE(native, {});
QCOMPARE(native32, { QFileInfo(QFINDTESTDATA("testdata/Library/testname-testversion-linux-32.jar")).absoluteFilePath() });
QCOMPARE(native64, { QFileInfo(QFINDTESTDATA("testdata/Library") + "/testname-testversion-linux-64.jar").absoluteFilePath() });
QCOMPARE(native32, { QFileInfo(QFINDTESTDATA("testdata/Libraries/testname-testversion-linux-32.jar")).absoluteFilePath() });
QCOMPARE(native64,
{ QFileInfo(QFINDTESTDATA("testdata/Libraries") + "/testname-testversion-linux-64.jar").absoluteFilePath() });
QStringList failedFiles;
auto dls = test.getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
auto dls = test.getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Libraries"));
QCOMPARE(dls.size(), 0);
QCOMPARE(failedFiles,
{ QFileInfo(QFINDTESTDATA("testdata/Library") + "/testname-testversion-linux-64.jar").absoluteFilePath() });
{ QFileInfo(QFINDTESTDATA("testdata/Libraries") + "/testname-testversion-linux-64.jar").absoluteFilePath() });
}
}
void test_onenine()
{
RuntimeContext r = dummyContext("osx");
auto test = readMojangJson(QFINDTESTDATA("testdata/Library/lib-simple.json"));
auto test = readMojangJson(QFINDTESTDATA("testdata/Libraries/lib-simple.json"));
{
QStringList jar, native, native32, native64;
test->getApplicableFiles(r, jar, native, native32, native64, QString());
@ -253,8 +254,8 @@ class LibraryTest : public QObject {
test->setHint("local");
{
QStringList jar, native, native32, native64;
test->getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
QCOMPARE(jar, { QFileInfo(QFINDTESTDATA("testdata/Library/codecwav-20101023.jar")).absoluteFilePath() });
test->getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Libraries"));
QCOMPARE(jar, { QFileInfo(QFINDTESTDATA("testdata/Libraries/codecwav-20101023.jar")).absoluteFilePath() });
QCOMPARE(native, {});
QCOMPARE(native32, {});
QCOMPARE(native64, {});
@ -262,7 +263,7 @@ class LibraryTest : public QObject {
r.system = "linux";
{
QStringList failedFiles;
auto dls = test->getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
auto dls = test->getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Libraries"));
QCOMPARE(dls.size(), 0);
QCOMPARE(failedFiles, {});
}
@ -270,12 +271,12 @@ class LibraryTest : public QObject {
void test_onenine_local_override()
{
RuntimeContext r = dummyContext("osx");
auto test = readMojangJson(QFINDTESTDATA("testdata/Library/lib-simple.json"));
auto test = readMojangJson(QFINDTESTDATA("testdata/Libraries/lib-simple.json"));
test->setHint("local");
{
QStringList jar, native, native32, native64;
test->getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
QCOMPARE(jar, { QFileInfo(QFINDTESTDATA("testdata/Library/codecwav-20101023.jar")).absoluteFilePath() });
test->getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Libraries"));
QCOMPARE(jar, { QFileInfo(QFINDTESTDATA("testdata/Libraries/codecwav-20101023.jar")).absoluteFilePath() });
QCOMPARE(native, {});
QCOMPARE(native32, {});
QCOMPARE(native64, {});
@ -283,7 +284,7 @@ class LibraryTest : public QObject {
r.system = "linux";
{
QStringList failedFiles;
auto dls = test->getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
auto dls = test->getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Libraries"));
QCOMPARE(dls.size(), 0);
QCOMPARE(failedFiles, {});
}
@ -291,7 +292,7 @@ class LibraryTest : public QObject {
void test_onenine_native()
{
RuntimeContext r = dummyContext("osx");
auto test = readMojangJson(QFINDTESTDATA("testdata/Library/lib-native.json"));
auto test = readMojangJson(QFINDTESTDATA("testdata/Libraries/lib-native.json"));
QStringList jar, native, native32, native64;
test->getApplicableFiles(r, jar, native, native32, native64, QString());
QCOMPARE(jar, QStringList());
@ -309,7 +310,7 @@ class LibraryTest : public QObject {
void test_onenine_native_arch()
{
RuntimeContext r = dummyContext("windows");
auto test = readMojangJson(QFINDTESTDATA("testdata/Library/lib-native-arch.json"));
auto test = readMojangJson(QFINDTESTDATA("testdata/Libraries/lib-native-arch.json"));
QStringList jar, native, native32, native64;
test->getApplicableFiles(r, jar, native, native32, native64, QString());
QCOMPARE(jar, {});

View file

@ -33,7 +33,7 @@ class MojangVersionFormatTest : public QObject {
private slots:
void test_Through_Simple()
{
QJsonDocument doc = readJson(QFINDTESTDATA("testdata/MojangVersionFormat/1.9-simple.json"));
QJsonDocument doc = readJson(QFINDTESTDATA("testdata/Libraries/1.9-simple.json"));
auto vfile = MojangVersionFormat::versionFileFromJson(doc, "1.9-simple.json");
auto doc2 = MojangVersionFormat::versionFileToJson(vfile);
writeJson("1.9-simple-passthorugh.json", doc2);
@ -43,7 +43,7 @@ class MojangVersionFormatTest : public QObject {
void test_Through()
{
QJsonDocument doc = readJson(QFINDTESTDATA("testdata/MojangVersionFormat/1.9.json"));
QJsonDocument doc = readJson(QFINDTESTDATA("testdata/Libraries/1.9.json"));
auto vfile = MojangVersionFormat::versionFileFromJson(doc, "1.9.json");
auto doc2 = MojangVersionFormat::versionFileToJson(vfile);
writeJson("1.9-passthorugh.json", doc2);

View file

@ -69,7 +69,7 @@ class ResourceFolderModelTest : public QObject {
void test_1178()
{
// source
QString source = QFINDTESTDATA("testdata/ResourceFolderModel/test_folder");
QString source = QFINDTESTDATA("testdata/Resources/test_folder");
// sanity check
QVERIFY(!source.endsWith('/'));
@ -133,7 +133,7 @@ class ResourceFolderModelTest : public QObject {
void test_addFromWatch()
{
QString source = QFINDTESTDATA("testdata/ResourceFolderModel");
QString source = QFINDTESTDATA("testdata/Resources");
ModFolderModel model(source, nullptr, false, true);
QCOMPARE(model.size(), 0);
@ -150,8 +150,8 @@ class ResourceFolderModelTest : public QObject {
void test_removeResource()
{
QString folder_resource = QFINDTESTDATA("testdata/ResourceFolderModel/test_folder");
QString file_mod = QFINDTESTDATA("testdata/ResourceFolderModel/supercoolmod.jar");
QString folder_resource = QFINDTESTDATA("testdata/Resources/test_folder");
QString file_mod = QFINDTESTDATA("testdata/Resources/supercoolmod.jar");
QTemporaryDir tmp;
ResourceFolderModel model(QDir(tmp.path()), nullptr, false, false);
@ -195,8 +195,8 @@ class ResourceFolderModelTest : public QObject {
void test_enable_disable()
{
QString folder_resource = QFINDTESTDATA("testdata/ResourceFolderModel/test_folder");
QString file_mod = QFINDTESTDATA("testdata/ResourceFolderModel/supercoolmod.jar");
QString folder_resource = QFINDTESTDATA("testdata/Resources/test_folder");
QString file_mod = QFINDTESTDATA("testdata/Resources/supercoolmod.jar");
QTemporaryDir tmp;
ResourceFolderModel model(tmp.path(), nullptr, false, false);

View file

@ -30,7 +30,7 @@ class ResourcePackParseTest : public QObject {
private slots:
void test_parseZIP()
{
QString source = QFINDTESTDATA("testdata/ResourcePackParse");
QString source = QFINDTESTDATA("testdata/Resources");
QString zip_rp = FS::PathCombine(source, "test_resource_pack_idk.zip");
ResourcePack pack{ QFileInfo(zip_rp) };
@ -46,7 +46,7 @@ class ResourcePackParseTest : public QObject {
void test_parseFolder()
{
QString source = QFINDTESTDATA("testdata/ResourcePackParse");
QString source = QFINDTESTDATA("testdata/Resources");
QString folder_rp = FS::PathCombine(source, "test_folder");
ResourcePack pack{ QFileInfo(folder_rp) };
@ -60,7 +60,7 @@ class ResourcePackParseTest : public QObject {
void test_parseFolder2()
{
QString source = QFINDTESTDATA("testdata/ResourcePackParse");
QString source = QFINDTESTDATA("testdata/Resources");
QString folder_rp = FS::PathCombine(source, "another_test_folder");
ResourcePack pack{ QFileInfo(folder_rp) };

View file

@ -1 +0,0 @@
MojangVersionFormat/

View file

@ -1 +0,0 @@
ResourcePackParse