From 8a0ebb9fa25fd44def17b03b3f8aa1a33ad77940 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Fri, 29 Sep 2017 13:43:08 -0700 Subject: Get tests running/passing under Linux (#194) * Get tests running/passing under Linux - Fix up `dlopen` abstraction - Fix up some test cases to request hlsl (rather than default to dxbc) so they can run on non-Windows targets - Fix up test runner ignore tests that can't run on current platform (and not count those as failure) - Fix file handle leeak in process spawner absttraction - Get additional test-related applications building - More tweaks to Travis script; in theory deployment is set up now (yeah, right) * fixup * fixup: Travis environment variable syntax * fixup: Buffer->begin * fixup: actually run full tests on one config * fixup: add build status badge for Travis --- source/core/platform.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'source/core/platform.cpp') diff --git a/source/core/platform.cpp b/source/core/platform.cpp index dbb536b0f..374606e4a 100644 --- a/source/core/platform.cpp +++ b/source/core/platform.cpp @@ -8,6 +8,7 @@ #undef WIN32_LEAN_AND_MEAN #undef NOMINMAX #else + #include "slang-string.h" #include #endif @@ -27,7 +28,19 @@ namespace Slang } #else { - void* h = dlopen(name, RTLD_LOCAL); + String fullName; + fullName.append("lib"); + fullName.append(name); + fullName.append(".so"); + + void* h = dlopen(fullName.Buffer(), RTLD_NOW|RTLD_LOCAL); + if(!h) + { + if(auto msg = dlerror()) + { + fprintf(stderr, "error: %s\n", msg); + } + } result.handle = (Handle) h; } -- cgit v1.2.3