ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Catkin: run specific unit test


#1

I know there are specific test commands
catkin_make run_tests to run all tests
and
catkin_make run_tests_<projectname>_gtest_<testname> to run specific test declared by catkin_add_gtest(…)

One test file can have multiple tests though.
Example:

TEST(testsuit1, test1) {
..
}

TEST(testsuit1, test2) {
..
}

TEST(testsuit2, test3) {
..
}

int main(int argc, char **argv) {
    testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}

Is that possible to run only testsuit1 or only test3 from my example?


#2

Thanks for your question. However we ask that you please ask questions on http://answers.ros.org following our support guidelines: http://wiki.ros.org/Support

ROS Discourse is for news and general interest discussions. ROS Answers provides a forum which can be filtered by tags to make sure the relevant people can find and/or answer the question, and not overload everyone with hundreds of posts.


#3

Sorry. I moved my question there. I din’t find how to close this one though.
https://answers.ros.org/question/271114/catkin-run-specific-unit-test/


#4

Thanks. I moved the thread to “Uncategorized” to decrease the number of people getting notifications I could close the topic as an administrator but I don’t expect many replies to come along.

For others reference the question is now here: https://answers.ros.org/question/271114/catkin-run-specific-unit-test/