Skip to content

Make tests pass #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 24 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e

# remove old build if any
if [ -f "app/gyt" ]; then
rm -rf app/gyt
fi

# Print the selected build type
echo "Selected build type: $BUILD_TYPE"
echo "Building the project... This will take a while to install dependencies for the first time."

# Run CMake with the selected build type
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DBUILD_TESTS=ON -G Ninja

# Build the project
ninja

# Tests
ctest

# symlink - so I can run it like gyt [arguments....]
sudo rm /usr/local/bin/gyt
sudo ln -s "$(pwd)/app/gyt" /usr/local/bin/gyt
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
add_executable(tests tests.cpp repository_t.cpp)
target_include_directories(tests PUBLIC ../ext)

target_link_libraries(tests PUBLIC repository)
target_link_libraries(tests PUBLIC boost_libraries repository)

# allow user to run tests with `make test` or `ctest`
include(../cmake/Catch.cmake)
Expand Down