Resolve RequireByString test suite failures on Ubuntu CI (#1124)

This PR resolves the RequireByString test suite failures in CI on
Ubuntu. The issue was that paths on linux are case sensitive and thus
MacOS/Windows machines simply behaved as if the paths to the test files
were case-insensitive, but the linux machine was unable to find the test
files. Those tests were `#ifdef'd` out, and have been un `#ifdef'd` to
demonstrate these changes work.
This commit is contained in:
Vighnesh-V 2023-12-05 14:31:02 -08:00 committed by GitHub
parent aafea36235
commit 2ea7193777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,15 +56,20 @@ public:
for (int i = 0; i < 20; ++i)
{
if (isDirectory(luauDirAbs + "/Luau/tests") || isDirectory(luauDirAbs + "/Client/Luau/tests"))
bool engineTestDir = isDirectory(luauDirAbs + "/Client/Luau/tests");
bool luauTestDir = isDirectory(luauDirAbs + "/luau/tests");
if (engineTestDir || luauTestDir)
{
if (isDirectory(luauDirAbs + "/Client/Luau/tests"))
if (engineTestDir)
{
luauDirRel += "/Client";
luauDirAbs += "/Client";
luauDirRel += "/Client/Luau";
luauDirAbs += "/Client/Luau";
}
else
{
luauDirRel += "/luau";
luauDirAbs += "/luau";
}
luauDirRel += "/Luau";
luauDirAbs += "/Luau";
if (type == PathType::Relative)
return luauDirRel;
@ -209,7 +214,6 @@ TEST_CASE("PathNormalization")
}
}
#if 0
TEST_CASE_FIXTURE(ReplWithPathFixture, "RequireSimpleRelativePath")
{
@ -390,6 +394,4 @@ TEST_CASE_FIXTURE(ReplWithPathFixture, "RequirePathWithParentAlias")
assertOutputContainsAll({"true", "result from other_dependency"});
}
#endif
TEST_SUITE_END();