Skip to content

Commit

Permalink
Merge pull request #1054 from ORNL/1053-enable-foxx-tests-in-ci-pipeline
Browse files Browse the repository at this point in the history
1053 enable foxx tests in ci pipeline
  • Loading branch information
JoshuaSBrown authored Nov 11, 2024
2 parents 01af96d + 3ded996 commit 3668deb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitlab/end_to_end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ end-to-end-foxx-setup:
- echo "docker run -d \\" >> "${RUN_FILE}"
- echo "--name \"foxx-${BRANCH_LOWER}-${CI_COMMIT_SHORT_SHA}-${random_string}\" \\" >> "${RUN_FILE}"
- echo "-e DATAFED_ZEROMQ_SYSTEM_SECRET=\"$CI_DATAFED_ZEROMQ_SYSTEM_SECRET\" \\" >> "${RUN_FILE}"
- echo "-e ENABLE_FOXX_TESTS=\"TRUE\" \\" >> "${RUN_FILE}"
- echo "-e DATAFED_DOMAIN=\"$CI_DATAFED_DOMAIN\" \\" >> "${RUN_FILE}"
- echo "-e DATAFED_DATABASE_PASSWORD=\"$CI_DATAFED_DATABASE_PASSWORD\" \\" >> "${RUN_FILE}"
- echo "-e DATAFED_DATABASE_IP_ADDRESS_PORT=\"$CI_DATAFED_DATABASE_IP_ADDRESS_PORT\" \\" >> "${RUN_FILE}"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
11. [1012] - Allow customized base build image for Docker dependencies and runtime Dockerfiles
12. [986] - Design improvement to upload and download transfer box.
13. [985] - Handles longer than needed timeouts on ui pages.
14. [1053] - Set CMake to enable foxx tests when built in the CI.

# v2024.6.17.10.40

Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ setting is turned on DataFed will build it's libraries as shared and try to
link to shared libraries." OFF)
OPTION(ENABLE_END_TO_END_API_TESTS "Enable end-to-end API testing" FALSE)
OPTION(ENABLE_END_TO_END_WEB_TESTS "Enable end-to-end web testing with Playwright" FALSE)
OPTION(ENABLE_FOXX_TESTS "Enable Foxx testing, off by default because it
will overwrite the test database." FALSE)

set(INSTALL_REPO_SERVER ${BUILD_REPO_SERVER})
set(INSTALL_AUTHZ ${BUILD_AUTHZ})
Expand Down
37 changes: 26 additions & 11 deletions docker/entrypoint_foxx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,32 @@ then
# Check to see if foxx has previously been installed
"${PROJECT_ROOT}/scripts/generate_datafed.sh"

"${DATAFED_DEPENDENCIES_INSTALL_PATH}/bin/cmake" -S. -B build \
-DBUILD_REPO_SERVER=False \
-DBUILD_COMMON=False \
-DBUILD_AUTHZ=False \
-DBUILD_CORE_SERVER=False \
-DBUILD_WEB_SERVER=False \
-DBUILD_DOCS=False \
-DBUILD_PYTHON_CLIENT=False \
-DBUILD_FOXX=True \
-DINSTALL_FOXX=True

# Should only run this if you are ok with making changes to the database
if [ "$ENABLE_FOXX_TESTS" == "TRUE" ]
then
"${DATAFED_DEPENDENCIES_INSTALL_PATH}/bin/cmake" -S. -B build \
-DBUILD_REPO_SERVER=False \
-DBUILD_COMMON=False \
-DBUILD_AUTHZ=False \
-DBUILD_CORE_SERVER=False \
-DBUILD_WEB_SERVER=False \
-DBUILD_DOCS=False \
-DBUILD_PYTHON_CLIENT=False \
-DBUILD_FOXX=True \
-DINSTALL_FOXX=True \
-DENABLE_FOXX_TESTS=True
else
"${DATAFED_DEPENDENCIES_INSTALL_PATH}/bin/cmake" -S. -B build \
-DBUILD_REPO_SERVER=False \
-DBUILD_COMMON=False \
-DBUILD_AUTHZ=False \
-DBUILD_CORE_SERVER=False \
-DBUILD_WEB_SERVER=False \
-DBUILD_DOCS=False \
-DBUILD_PYTHON_CLIENT=False \
-DBUILD_FOXX=True \
-DINSTALL_FOXX=True
fi

"${DATAFED_DEPENDENCIES_INSTALL_PATH}/bin/cmake" --build build

Expand Down

0 comments on commit 3668deb

Please sign in to comment.