Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6401b95
Merge pull request #363 from TEAMuP-dev/develop
cwitkowitz Apr 3, 2026
8f6318a
Update CMakeLists.txt
AydinIqbalNU Jun 24, 2026
b95d381
Create CMakeLists.txt
AydinIqbalNU Jun 24, 2026
f6b72c7
Create test_main.cpp
AydinIqbalNU Jun 24, 2026
751bbec
Create test_smoke.cpp
AydinIqbalNU Jun 24, 2026
1b54ce3
Create pr-build-test.yml - Add CI workflow for unit tests and coverage
AydinIqbalNU Jun 24, 2026
39db70b
Update pr-build-test.yml
AydinIqbalNU Jun 24, 2026
ac79844
Update pr-build-test.yml
AydinIqbalNU Jun 24, 2026
c78f0ea
Update pr-build-test.yml
AydinIqbalNU Jun 24, 2026
2dc28a1
Update pr-build-test.yml
AydinIqbalNU Jun 24, 2026
0195c7c
Update pr-build-test.yml
AydinIqbalNU Jun 25, 2026
8a0ef8d
Update pr-build-test.yml
AydinIqbalNU Jun 25, 2026
b9e3283
Add new test files to harp_tests executable
AydinIqbalNU Jul 20, 2026
dd4bad7
Create README.md for HARP Unit Testing Framework
AydinIqbalNU Jul 20, 2026
cf144a2
Add HARPLogger singleton implementation
AydinIqbalNU Jul 20, 2026
1a5379d
Add HARP Unit Test Matrix documentation
AydinIqbalNU Jul 20, 2026
b398ea1
Add unit tests for Client class functionality
AydinIqbalNU Jul 20, 2026
954e0c4
Add unit tests for GradioClient functionality
AydinIqbalNU Jul 20, 2026
0e7be5e
Add unit tests for controls parsing and behavior
AydinIqbalNU Jul 20, 2026
e45ed21
Add unit tests for Settings class behavior
AydinIqbalNU Jul 20, 2026
a8ea557
Link harp_tests with gtest instead of gtest_main
AydinIqbalNU Jul 20, 2026
6f871ee
Update CMakeLists.txt
AydinIqbalNU Jul 20, 2026
cf4789c
Add option to enable coverage instrumentation
AydinIqbalNU Jul 20, 2026
d5b1eed
Enable code coverage for harp_tests
AydinIqbalNU Jul 20, 2026
15f3ada
Update CMake configuration for coverage and generator
AydinIqbalNU Jul 20, 2026
5d8590e
Refactor PR build and test workflow for coverage
AydinIqbalNU Jul 20, 2026
ab499a5
Add compile definitions for harp_tests
AydinIqbalNU Jul 20, 2026
e47ec04
Change EXPECT_FALSE to EXPECT_TRUE for HuggingFace
AydinIqbalNU Jul 27, 2026
09e5135
Update client_tests.cpp
AydinIqbalNU Jul 27, 2026
0fe8b89
Add support for globbing test source files
AydinIqbalNU Jul 27, 2026
c61ae77
Add close parens to globbing
AydinIqbalNU Jul 27, 2026
8d17e38
Enable coverage options for HARP tests
AydinIqbalNU Jul 27, 2026
ad8b300
Remove coverage options from harp_tests CMakeLists
AydinIqbalNU Jul 27, 2026
7f93281
Remove extra tests subdirectory from CMakeLists
AydinIqbalNU Jul 27, 2026
76a3fa2
Incorperate clickable links to failed tests
AydinIqbalNU Jul 27, 2026
2d10b3e
fix indentation
AydinIqbalNU Jul 27, 2026
408cf1e
debuggin
AydinIqbalNU Jul 27, 2026
c5b501d
Change condition for annotating failed tests
AydinIqbalNU Jul 27, 2026
ecc9a9d
Update assertion for HuggingFace provider token
AydinIqbalNU Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
407 changes: 407 additions & 0 deletions .github/workflows/pr-build-test.yml

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,50 @@ if (APPLE)

set(CMAKE_SKIP_RPATH "NO" CACHE INTERNAL "")
endif(APPLE)

# --------------------------------------------------
# Unit Testing and Coverage
# --------------------------------------------------

option(HARP_BUILD_TESTS "Build HARP unit tests" OFF)
option(HARP_ENABLE_COVERAGE "Enable coverage instrumentation" OFF)

function(enable_harp_coverage target_name)
if(NOT TARGET ${target_name})
message(FATAL_ERROR
"Cannot enable coverage because target '${target_name}' does not exist."
)
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(${target_name} PRIVATE
-O0
-g
--coverage
)

target_link_options(${target_name} PRIVATE
--coverage
)
else()
message(WARNING
"HARP_ENABLE_COVERAGE is enabled, but coverage is only configured for GCC and Clang."
)
endif()
endfunction()

# Instrument the complete HARP application target so the coverage baseline
# includes production files that have not yet been exercised by unit tests.
if(HARP_ENABLE_COVERAGE)
enable_harp_coverage(${PROJECT_NAME})
endif()

if(HARP_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)

# harp_tests does not exist until tests/CMakeLists.txt has been processed.
if(HARP_ENABLE_COVERAGE)
enable_harp_coverage(harp_tests)
endif()
endif()
36 changes: 36 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
include(FetchContent)

FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)

FetchContent_MakeAvailable(googletest)

file(GLOB_RECURSE HARP_TEST_SOURCES
CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/*_tests.cpp"
)

add_executable(harp_tests
test_main.cpp
test_harp_logger.cpp
${HARP_TEST_SOURCES}
)

target_link_libraries(harp_tests PRIVATE
GTest::gtest
juce::juce_core
juce::juce_data_structures
juce::juce_events
juce::juce_gui_basics
)

target_compile_definitions(harp_tests PRIVATE
JUCE_WEB_BROWSER=0
JUCE_USE_CURL=1
JUCE_LOAD_CURL_SYMBOLS_LAZILY=1
)

add_test(NAME harp_tests COMMAND harp_tests)
Loading