Skip to content

Commit 1cc4382

Browse files
Make tests pass (#51)
1 parent 75aec9a commit 1cc4382

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

test.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# remove old build if any
5+
if [ -f "app/gyt" ]; then
6+
rm -rf app/gyt
7+
fi
8+
9+
# Print the selected build type
10+
echo "Selected build type: $BUILD_TYPE"
11+
echo "Building the project... This will take a while to install dependencies for the first time."
12+
13+
# Run CMake with the selected build type
14+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DBUILD_TESTS=ON -G Ninja
15+
16+
# Build the project
17+
ninja
18+
19+
# Tests
20+
ctest
21+
22+
# symlink - so I can run it like gyt [arguments....]
23+
sudo rm /usr/local/bin/gyt
24+
sudo ln -s "$(pwd)/app/gyt" /usr/local/bin/gyt

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
add_executable(tests tests.cpp repository_t.cpp)
22
target_include_directories(tests PUBLIC ../ext)
33

4-
target_link_libraries(tests PUBLIC repository)
4+
target_link_libraries(tests PUBLIC boost_libraries repository)
55

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

0 commit comments

Comments
 (0)