-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize CMake/CTest scripts (#2698)
Following the work in #2664, this PR removes some of the bottlenecks slowing down the test suite on developer machines by running long tests concurrently where possible. This PR also adds the ability to run Cypress tests concurrently and reorganizes some of the messy test generation helper functions. While it would be nice to run all of the Cypress tests concurrently, Cypress is resource intensive and experiments only showed a marginal improvement in running times. On my developer machine, these changes reduced the running time for the full test suite from 9 minutes to 8.5 minutes. Although the CI runners are substantially less powerful than my machine, I expect at least a small reduction in CI job times.
- Loading branch information
1 parent
f78e107
commit 305ce6c
Showing
12 changed files
with
100 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
function(add_vue_test TestName) | ||
add_test( | ||
NAME "Spec/${TestName}" | ||
COMMAND "node_modules/.bin/jest" "tests/Spec/${TestName}.spec.js" | ||
WORKING_DIRECTORY "${CDash_SOURCE_DIR}" | ||
) | ||
endfunction() | ||
|
||
add_vue_test(build-configure) | ||
add_vue_test(build-summary) | ||
add_vue_test(edit-project) | ||
add_vue_test(manage-measurements) | ||
add_vue_test(header-menu) | ||
add_vue_test(test-details) |
2 changes: 1 addition & 1 deletion
2
tests/Spec/page-header/header-menu.spec.js → tests/Spec/header-menu.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function(add_cypress_component_test TestName) | ||
set_app_url() | ||
|
||
add_test( | ||
NAME cypress/component/${TestName} | ||
COMMAND ${NPX_EXE} cypress run | ||
--component | ||
--project ${CDash_SOURCE_DIR} | ||
--spec ${CDash_SOURCE_DIR}/tests/cypress/component/${TestName}.cy.js | ||
--config baseUrl=${APP_URL} | ||
) | ||
# Cypress tries to put stuff in our home directory, which doesn't work for /var/www. | ||
set_tests_properties(cypress/component/${TestName} PROPERTIES | ||
ENVIRONMENT "HOME=${CDash_BINARY_DIR};" | ||
DISABLED "$<STREQUAL:${CDASH_IMAGE},ubi>" | ||
RESOURCE_LOCK "dev-server-port" | ||
) | ||
endfunction() | ||
|
||
add_cypress_component_test(data-table) | ||
add_cypress_component_test(loading-indicator) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.