-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Ctest support for functional testing (#10064)
* Add ctest support for functional testing * Use ctest for the Linux functional workflow * Download addons into build dir * Use QT_QPA_PLATFORM=offscreen instead of xvfb-run * Add socks proxy tests to the unit test group * Fix socks5connection tests on MacOS
- Loading branch information
Showing
14 changed files
with
105 additions
and
78 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 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
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,43 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
## Add ctests for each of the functional test scripts | ||
file(GLOB FTEST_SOURCES | ||
LIST_DIRECTORIES FALSE | ||
RELATIVE ${CMAKE_SOURCE_DIR} | ||
"test*.js" | ||
) | ||
|
||
# We must build the test addons for functional testing. | ||
add_subdirectory(addons) | ||
|
||
foreach(FILENAME ${FTEST_SOURCES}) | ||
get_filename_component(FTEST_NAME ${FILENAME} NAME_WLE) | ||
add_test(NAME ${FTEST_NAME} | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND npm run functionalTest -- ${FILENAME}) | ||
|
||
set_tests_properties(${FTEST_NAME} PROPERTIES | ||
RUN_SERIAL TRUE | ||
LABELS functional | ||
) | ||
set_property(TEST ${FTEST_NAME} PROPERTY ENVIRONMENT | ||
MVPN_BIN=$<TARGET_FILE:mozillavpn> | ||
MVPN_ADDONS_PATH=${CMAKE_CURRENT_BINARY_DIR}/addons | ||
) | ||
set_property(TEST ${FTEST_NAME} PROPERTY REQUIRED_FILES | ||
${CMAKE_CURRENT_BINARY_DIR}/addons/prod/manifest.json | ||
) | ||
endforeach() | ||
|
||
file(GLOB ADDON_TARGETS | ||
LIST_DIRECTORIES TRUE | ||
RELATIVE ${CMAKE_SOURCE_DIR}/addons | ||
"[0-9][0-9]_*") | ||
|
||
foreach(SCENARIO ${ADDON_TARGETS}) | ||
set_property(TEST testAddons APPEND PROPERTY REQUIRED_FILES | ||
${CMAKE_BINARY_DIR}/addons/${SCENARIO}/manifest.json | ||
) | ||
endforeach() |
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
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