From 7ee008e150bc5bcf76082d726f719ee0fdfda982 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Wed, 11 Feb 2026 02:37:39 -0600 Subject: Fluorine Manager: full Linux port of Mod Organizer 2 Complete native Linux port with FUSE-based virtual filesystem, Proton/umu-run integration, and Flatpak packaging. Key features: - FUSE VFS replacing Windows USVFS (in-process + standalone helper for Flatpak) - Proton/GE-Proton/umu-run launcher with env var forwarding - Flatpak support (sandbox-aware VFS, NXM handler, umu-run) - Wine prefix management UI - Case-insensitive path resolution for Linux filesystems - QSettings-safe INI handling (avoids Bethesda INI corruption) - Portable instance support with auto-generated launcher scripts Co-Authored-By: Claude Opus 4.6 --- .../test/usvfs_test_runner/usvfs_test_runner.cpp | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 libs/usvfs/test/usvfs_test_runner/usvfs_test_runner.cpp (limited to 'libs/usvfs/test/usvfs_test_runner/usvfs_test_runner.cpp') diff --git a/libs/usvfs/test/usvfs_test_runner/usvfs_test_runner.cpp b/libs/usvfs/test/usvfs_test_runner/usvfs_test_runner.cpp new file mode 100644 index 0000000..a70fb0f --- /dev/null +++ b/libs/usvfs/test/usvfs_test_runner/usvfs_test_runner.cpp @@ -0,0 +1,105 @@ +#include + +#include +#include +#include +#include + +static std::string usvfs_test_command(const char* scenario, const char* platform, + const char* testflag = nullptr, + const char* opsarg = nullptr) +{ + using namespace test; + std::string command = + path_of_test_bin(platform_dependant_executable("usvfs_test", "exe", platform)) + .string(); + if (testflag) { + command += " -"; + command += testflag; + } + if (opsarg) { + command += " -opsarg -"; + command += opsarg; + } + command += " "; + command += scenario; + if (testflag || opsarg) { + command += ":"; + if (testflag) { + command += testflag; + command += "_"; + } + if (opsarg) { + command += opsarg; + command += "_"; + } + command += platform; + } + return command; +} + +static DWORD spawn(std::string commandline) +{ + STARTUPINFOA si{0}; + si.cb = sizeof(si); + PROCESS_INFORMATION pi{0}; + + std::cout << "Running: [" << commandline << "]" << std::endl; + if (!CreateProcessA(NULL, commandline.data(), NULL, NULL, FALSE, 0, NULL, NULL, &si, + &pi)) { + DWORD gle = GetLastError(); + std::cerr << "CreateProcess failed error=" << gle << std::endl; + return 98; + } + + WaitForSingleObject(pi.hProcess, INFINITE); + + DWORD exit = 99; + if (!GetExitCodeProcess(pi.hProcess, &exit)) { + DWORD gle = GetLastError(); + std::cerr << "GetExitCodeProcess failed error=" << gle << std::endl; + } + + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + + return exit; +} + +TEST(UsvfsTest, basic_x64) +{ + EXPECT_EQ(0, spawn(usvfs_test_command("basic", "x64"))); +} + +TEST(UsvfsTest, basic_x86) +{ + EXPECT_EQ(0, spawn(usvfs_test_command("basic", "x86"))); +} + +TEST(UsvfsTest, basic_ops32_x64) +{ + EXPECT_EQ(0, spawn(usvfs_test_command("basic", "x64", "ops32"))); +} + +TEST(UsvfsTest, basic_ops64_x86) +{ + EXPECT_EQ(0, spawn(usvfs_test_command("basic", "x86", "ops64"))); +} + +/* +TEST(UsvfsTest, basic_ntapi_x64) +{ + EXPECT_EQ(0, spawn(usvfs_test_command("basic", "x64", nullptr, "ntapi"))); +} + +TEST(UsvfsTest, basic_ntapi_x86) +{ + EXPECT_EQ(0, spawn(usvfs_test_command("basic", "x86", nullptr, "ntapi"))); +} +*/ + +int main(int argc, char** argv) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} -- cgit v1.3.1