Skip to content

Commit

Permalink
Run tests in temporary (build) folder instead of the source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Sep 7, 2024
1 parent a50e3a5 commit 237b7d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ $(BUILD)/runtests: $(TEST_C_OBJS) $(GOOGLE_TEST_OBJS) $(TEST_CPP_OBJS)
$(CXX) $(LDFLAGS) $(TEST_C_OBJS) $(GOOGLE_TEST_OBJS) $(TEST_CPP_OBJS) $(LIBRARIES) -o $@

runtests: $(BUILD)/runtests
./$(BUILD)/runtests
mkdir $(BUILD)/Tests
cp -r Tests/TestData $(BUILD)/Tests/
cp -r Tests/PresetManagerData $(BUILD)/Tests/
cd $(BUILD) ; ./runtests

$(BUILD)/Test%: $(TEST_C_OBJS) $(GOOGLE_TEST_OBJS) $(BUILD)/%Tests.o $(BUILD)/gtest-runner.o
$(CXX) $(LDFLAGS) $^ $(LIBRARIES) -o $@
Expand Down

0 comments on commit 237b7d2

Please sign in to comment.