Skip to content

Commit 2a3ef05

Browse files
Fix issues and re-enable tests disabled in PR #165983 (from PR #165360) (#166147)
1. Fixed test setup to correctly create .so/.dylib files in the build directory. Previously, the build was happening in the source directory using the same input parent path. 2. Fixed architecture compatibility check in #166510 . Co-authored-by: Vassil Vassilev <v.g.vassilev@gmail.com>
1 parent 6fac21e commit 2a3ef05

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/unittests/ExecutionEngine/Orc/LibraryResolverTest.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
using namespace llvm;
3131
using namespace llvm::orc;
3232

33-
// Disabled due to test setup issue — YAML to shared library creation seems
34-
// invalid on some build bots. (PR #165360) Not related to code logic.
35-
#if 0
33+
#if defined(__APPLE__) || defined(__linux__)
3634
// TODO: Add COFF (Windows) support for these tests.
3735
// this facility also works correctly on Windows (COFF),
3836
// so we should eventually enable and run these tests for that platform as well.
@@ -105,8 +103,9 @@ class LibraryTestEnvironment : public ::testing::Environment {
105103
if (!sys::fs::exists(InputDirPath))
106104
return;
107105

108-
SmallString<128> UniqueDir;
109-
sys::path::append(UniqueDir, InputDirPath);
106+
SmallString<512> ExecPath(sys::fs::getMainExecutable(nullptr, nullptr));
107+
sys::path::remove_filename(ExecPath);
108+
SmallString<128> UniqueDir(ExecPath);
110109
std::error_code EC = sys::fs::createUniqueDirectory(UniqueDir, DirPath);
111110

112111
if (EC)

0 commit comments

Comments
 (0)