Activate plugin tests on Windows.
PiperOrigin-RevId: 489183597 Change-Id: I1e5212777514fbc5a246f02a4446a9dbb8a0dbd3
This commit is contained in:
committed by
Copybara-Service
parent
fa0f6399d5
commit
a9781d9bea
@@ -13,5 +13,5 @@
|
||||
# limitations under the License.
|
||||
|
||||
mujoco_test(elasticity_test)
|
||||
target_link_libraries(elasticity_test fixture gmock elasticity)
|
||||
target_link_libraries(elasticity_test fixture gmock)
|
||||
|
||||
|
||||
@@ -27,8 +27,28 @@
|
||||
|
||||
namespace mujoco {
|
||||
namespace {
|
||||
using PluginTest = MujocoTest;
|
||||
|
||||
class PluginTest : public MujocoTest {
|
||||
public:
|
||||
// load plugin library
|
||||
PluginTest() : MujocoTest() {
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
mj_loadPluginLibrary((
|
||||
std::string(std::getenv("MUJOCO_PLUGIN_DIR")) +
|
||||
std::string("\\elasticity.dll")).c_str());
|
||||
#else
|
||||
#if defined(__APPLE__)
|
||||
mj_loadPluginLibrary((
|
||||
std::string(std::getenv("MUJOCO_PLUGIN_DIR")) +
|
||||
std::string("/libelasticity.dylib")).c_str());
|
||||
#else
|
||||
mj_loadPluginLibrary((
|
||||
std::string(std::getenv("MUJOCO_PLUGIN_DIR")) +
|
||||
std::string("/libelasticity.so")).c_str());
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
// -------------------------------- cable -----------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user