Automated g4 rollback of changelist 489183597.
*** Reason for rollback *** GitHub path is different *** Original change description *** Activate plugin tests on Windows. *** PiperOrigin-RevId: 489207765 Change-Id: If48dede94c8623b92526375a567edcd49c548e63
This commit is contained in:
committed by
Copybara-Service
parent
a9781d9bea
commit
17c82e2f02
+4
-12
@@ -33,17 +33,6 @@ macro(mujoco_test name)
|
|||||||
set_tests_properties(
|
set_tests_properties(
|
||||||
${testList} PROPERTIES ENVIRONMENT "PATH=$<TARGET_FILE_DIR:mujoco>;$ENV{PATH}"
|
${testList} PROPERTIES ENVIRONMENT "PATH=$<TARGET_FILE_DIR:mujoco>;$ENV{PATH}"
|
||||||
)
|
)
|
||||||
set_tests_properties(
|
|
||||||
${testList} PROPERTIES ENVIRONMENT "MUJOCO_PLUGIN_DIR=${CMAKE_BINARY_DIR}/bin"
|
|
||||||
)
|
|
||||||
elseif(APPLE)
|
|
||||||
set_tests_properties(
|
|
||||||
${testList} PROPERTIES ENVIRONMENT "MUJOCO_PLUGIN_DIR=${CMAKE_BINARY_DIR}/lib"
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
set_tests_properties(
|
|
||||||
${testList} PROPERTIES ENVIRONMENT "MUJOCO_PLUGIN_DIR=${CMAKE_BINARY_DIR}/lib"
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@@ -76,4 +65,7 @@ add_subdirectory(engine)
|
|||||||
add_subdirectory(sample)
|
add_subdirectory(sample)
|
||||||
add_subdirectory(user)
|
add_subdirectory(user)
|
||||||
add_subdirectory(xml)
|
add_subdirectory(xml)
|
||||||
add_subdirectory(plugin/elasticity)
|
|
||||||
|
if(NOT WIN32)
|
||||||
|
add_subdirectory(plugin/elasticity)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -13,5 +13,5 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
mujoco_test(elasticity_test)
|
mujoco_test(elasticity_test)
|
||||||
target_link_libraries(elasticity_test fixture gmock)
|
target_link_libraries(elasticity_test fixture gmock elasticity)
|
||||||
|
|
||||||
|
|||||||
@@ -27,28 +27,8 @@
|
|||||||
|
|
||||||
namespace mujoco {
|
namespace mujoco {
|
||||||
namespace {
|
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 -----------------------------------
|
// -------------------------------- cable -----------------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user