From 2ea7193777c3f5fa5011be83eb354d42351f753d Mon Sep 17 00:00:00 2001 From: Vighnesh-V Date: Tue, 5 Dec 2023 14:31:02 -0800 Subject: [PATCH] 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. --- tests/RequireByString.test.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/RequireByString.test.cpp b/tests/RequireByString.test.cpp index ad35b491..0e5ad4ff 100644 --- a/tests/RequireByString.test.cpp +++ b/tests/RequireByString.test.cpp @@ -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();