Skip to content

Commit 5c99789

Browse files
committed
Add headless tests and PolyScope X switch
1 parent dffe4aa commit 5c99789

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

tests/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,20 @@ if (INTEGRATION_TESTS)
8383
)
8484

8585
# ExternalControlProgram tests
86-
add_executable(external_control_program_tests test_external_control_program.cpp)
87-
target_link_libraries(external_control_program_tests PRIVATE ur_client_library::urcl GTest::gtest_main)
88-
gtest_add_tests(TARGET external_control_program_tests
86+
add_executable(external_control_program_tests_urcap test_external_control_program.cpp)
87+
target_link_libraries(external_control_program_tests_urcap PRIVATE ur_client_library::urcl GTest::gtest_main)
88+
gtest_add_tests(TARGET external_control_program_tests_urcap
8989
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
9090
EXTRA_ARGS --headless false
9191
TEST_SUFFIX _urcap
9292
)
93+
add_executable(external_control_program_tests_headless test_external_control_program.cpp)
94+
target_link_libraries(external_control_program_tests_headless PRIVATE ur_client_library::urcl GTest::gtest_main)
95+
gtest_add_tests(TARGET external_control_program_tests_headless
96+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
97+
EXTRA_ARGS --headless true
98+
TEST_SUFFIX _headless
99+
)
93100

94101
# InstructionExecutor tests
95102
add_executable(instruction_executor_test_urcap test_instruction_executor.cpp)

tests/test_external_control_program.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
#include <gtest/gtest.h>
3232

33+
#include "test_utils.h"
3334
#include "ur_client_library/example_robot_wrapper.h"
3435

3536
using namespace urcl;
@@ -55,6 +56,13 @@ class ExternalControlProgramTest : public ::testing::Test
5556
}
5657

5758
protected:
59+
static void SetUpTestSuite()
60+
{
61+
if (!(robotVersionLessThan(g_ROBOT_IP, "10.0.0") || g_HEADLESS))
62+
{
63+
GTEST_SKIP_("Running URCap tests for PolyScope X is currently not supported.");
64+
}
65+
}
5866
void SetUp() override
5967
{
6068
std::string modified_script_path = extendScript(SCRIPT_FILE);

0 commit comments

Comments
 (0)