{"id":1853,"date":"2025-03-25T11:55:57","date_gmt":"2025-03-25T11:55:57","guid":{"rendered":"https:\/\/opm-project.org\/?page_id=1853"},"modified":"2025-03-25T13:20:43","modified_gmt":"2025-03-25T13:20:43","slug":"running-tests-with-ctest","status":"publish","type":"page","link":"https:\/\/opm-project.org\/?page_id=1853","title":{"rendered":"Running tests with CTest"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Running tests when compiling from source<\/h2>\n\n\n\n<p>You can run the tests of any OPM repository with the CTest command line tool. Move to your build directory for your OPM repository, and run CTest in your terminal by simply running<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ctest<\/code><\/pre>\n\n\n\n<p>To target specific tests, use <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ctest -R some_text<\/code><\/pre>\n\n\n\n<p>to run exactly the tests that have <code>some_text<\/code> in their name. For verbose output from the test, and the <code>-VV<\/code> flag. <br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Running GPU tests<\/h2>\n\n\n\n<p>All GPU specific tests have the <code>gpu<\/code> label, meaning one can run the GPU tests by running<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>ctest -L gpu -VV<\/code><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Running tests when compiling from source You can run the tests of any OPM repository with the CTest command line tool. Move to your build directory for your OPM repository, and run CTest in your terminal by simply running To target specific tests, use to run exactly the tests that have some_text in their name. &hellip; <a href=\"https:\/\/opm-project.org\/?page_id=1853\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Running tests with CTest<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/opm-project.org\/index.php?rest_route=\/wp\/v2\/pages\/1853"}],"collection":[{"href":"https:\/\/opm-project.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/opm-project.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/opm-project.org\/index.php?rest_route=\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/opm-project.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1853"}],"version-history":[{"count":6,"href":"https:\/\/opm-project.org\/index.php?rest_route=\/wp\/v2\/pages\/1853\/revisions"}],"predecessor-version":[{"id":1869,"href":"https:\/\/opm-project.org\/index.php?rest_route=\/wp\/v2\/pages\/1853\/revisions\/1869"}],"wp:attachment":[{"href":"https:\/\/opm-project.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}