1import core.runtime, core.sys.posix.dlfcn;
2
3extern(C) alias RunTests = int function();
4
5extern(C) int runDepTests(const char* name)
6{
7    auto h = rt_loadLibrary(name);
8    if (h is null) return false;
9    auto runTests = cast(RunTests).dlsym(h, "runTests");
10    assert(runTests !is null);
11    if (!runTests()) return false;
12    return rt_unloadLibrary(h);
13}
14