Skip to content

Commit

Permalink
Merge branch 'commontk:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
txdy077345 authored Feb 21, 2024
2 parents 0717beb + 51c9f4a commit 4475cc9
Show file tree
Hide file tree
Showing 912 changed files with 28,557 additions and 4,197 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI (Lint)

on:
# Triggers the workflow on push or pull request events
push:
branches: [ master ]
pull_request:
branches:
- "*"

permissions:
contents: read

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.9'

- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # v3.0.0
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
hooks:
- id: check-added-large-files
args: ['--maxkb=1024']
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
exclude: "\\.(svg|vtk|vtp)$"
28 changes: 26 additions & 2 deletions Applications/Testing/Cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ if(CTK_APP_ctkDICOMQuery AND CTK_APP_ctkDICOMRetrieve)
set(DCMQRSCP_STORE_DIR ${CTK_BINARY_DIR}/Testing/Temporary)
set(ctkDICOMRetrieve_STORE_DIR ${CTK_BINARY_DIR}/Testing/Temporary/ctkDICOMRetrieveStorage)
set(DCMQRSCP_CONFIG ${CTK_BINARY_DIR}/Testing/Temporary/dcmqrscp.cfg)
if(UNIX)
set(DCMQRSCP_HOSTNAME "localhost")
else()
cmake_host_system_information(RESULT DCMQRSCP_HOSTNAME QUERY HOSTNAME)
endif()
configure_file( dcmqrscp.cfg.in ${DCMQRSCP_CONFIG} )

set(ctkDICOMQuery_DB_FILE ${CTK_BINARY_DIR}/Testing/Temporary/ctkDICOMApplicationTest1.db)
Expand All @@ -17,22 +22,36 @@ if(CTK_APP_ctkDICOMQuery AND CTK_APP_ctkDICOMRetrieve)
find_program(DCMTK_DCMQRSCP_EXECUTABLE dcmqrscp
PATHS
${DCMTK_DIR}/bin
PATH_SUFFIXES
${CMAKE_CONFIGURATION_TYPES}
NO_DEFAULT_PATH
)

find_program(DCMTK_STORESCU_EXECUTABLE storescu
PATHS
${DCMTK_DIR}/bin
PATH_SUFFIXES
${CMAKE_CONFIGURATION_TYPES}
NO_DEFAULT_PATH
)

#
# Add Tests
#
ctk_add_executable_utf8(ctkDICOMApplicationTest1 ctkDICOMApplicationTest1.cpp)
target_link_libraries(ctkDICOMApplicationTest1 Qt${CTK_QT_VERSION}::Core)
target_link_libraries(ctkDICOMApplicationTest1
CTKCore
Qt${CTK_QT_VERSION}::Core
)

include_directories(
${CTKCore_SOURCE_DIR}
${CTKCore_BINARY_DIR}
)

set(testname ctkDICOMApplicationTest1)

ADD_TEST( NAME ctkDICOMApplicationTest1
add_test( NAME ${testname}
COMMAND
$<TARGET_FILE:ctkDICOMApplicationTest1>
${DCMTK_DCMQRSCP_EXECUTABLE}
Expand All @@ -45,4 +64,9 @@ if(CTK_APP_ctkDICOMQuery AND CTK_APP_ctkDICOMRetrieve)
$<TARGET_FILE:ctkDICOMRetrieve>
${ctkDICOMRetrieve_STORE_DIR}
)

set_property(TEST ${testname} PROPERTY ENVIRONMENT_MODIFICATION "${CTK_TEST_LAUNCH_BUILD_ENVIRONMENT_MODIFICATION}")

set_property(TEST ${testname} PROPERTY RESOURCE_LOCK "dcmqrscp")

endif()
Loading

0 comments on commit 4475cc9

Please sign in to comment.