Fixed MinGW test.

This commit is contained in:
Бранимир Караџић
2024-10-27 09:22:17 -07:00
parent 57be909148
commit f6673d5bf4
3 changed files with 7 additions and 8 deletions

View File

@@ -623,12 +623,12 @@ function toolchain(_buildDir, _libDir)
"MINGW_HAS_SECURE_API=1", "MINGW_HAS_SECURE_API=1",
} }
buildoptions { buildoptions {
"-Wa,-mbig-obj",
"-Wundef",
"-Wunused-value", "-Wunused-value",
"-fdata-sections", "-fdata-sections",
"-ffunction-sections", "-ffunction-sections",
"-msse4.2", "-msse4.2",
"-Wunused-value",
"-Wundef",
} }
linkoptions { linkoptions {
"-Wl,--gc-sections", "-Wl,--gc-sections",

View File

@@ -865,14 +865,18 @@ namespace bx
return false; return false;
} }
#if BX_CRT_MSVC #if BX_CRT_MSVC || BX_CRT_MINGW
int32_t result = -1; int32_t result = -1;
FileInfo fi; FileInfo fi;
if (stat(fi, _filePath) ) if (stat(fi, _filePath) )
{ {
if (FileType::Dir == fi.type) if (FileType::Dir == fi.type)
{ {
# if BX_CRT_MINGW
result = ::rmdir(_filePath.getCPtr() );
# else
result = ::_rmdir(_filePath.getCPtr() ); result = ::_rmdir(_filePath.getCPtr() );
# endif // BX_CRT_MINGW
} }
else else
{ {

View File

@@ -130,11 +130,6 @@ TEST_CASE("FilePath temp", "[filepath]")
tmp.join("bx.test/abvgd/555333/test"); tmp.join("bx.test/abvgd/555333/test");
REQUIRE(bx::makeAll(tmp, bx::ErrorAssert{}) ); REQUIRE(bx::makeAll(tmp, bx::ErrorAssert{}) );
if (BX_ENABLED(BX_CRT_MINGW) )
{
SKIP("bx::removeAll fails on GHA MinGW container.");
}
tmp.set(bx::Dir::Temp); tmp.set(bx::Dir::Temp);
tmp.join("bx.test"); tmp.join("bx.test");
REQUIRE(bx::removeAll(tmp, bx::ErrorAssert{}) ); REQUIRE(bx::removeAll(tmp, bx::ErrorAssert{}) );