mirror of https://github.com/bqv/weechat-xmpp
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
747 B
Makefile
26 lines
747 B
Makefile
#!/usr/bin/env -S gmake test coverage
|
|
# vim: set noexpandtab:
|
|
|
|
.PHONY: debug
|
|
debug: xmpp.so
|
|
env LD_PRELOAD=$(DEBUG) gdb -ex "handle SIGPIPE nostop noprint pass" --args \
|
|
weechat -a -P 'alias,buflist,exec,irc,relay' -r '/plugin load ./xmpp.so'
|
|
|
|
tests/xmpp.cov.so: $(COVS) $(DEPS) $(HDRS)
|
|
$(CXX) --coverage -shared $(LDFLAGS) -o tests/xmpp.cov.so -Wl,--as-needed $(DEPS) $(LDLIBS) $(COVS)
|
|
|
|
tests/run: $(COVS) tests/main.cc tests/xmpp.cov.so $(wildcard tests/*.inl)
|
|
cd tests && $(CXX) $(CPPFLAGS) $(LDFLAGS) -o run $$PWD/xmpp.cov.so main.cc $(patsubst %,../%,$(DEPS)) $(LDLIBS)
|
|
|
|
.PHONY: test
|
|
test: tests/run
|
|
cd tests && ./run -sm
|
|
|
|
.PHONY: coverage
|
|
coverage: tests/run
|
|
gcovr --txt -s
|
|
|
|
.PHONY: check
|
|
check:
|
|
clang-check --analyze *.c *.cc *.cpp
|