-
Notifications
You must be signed in to change notification settings - Fork 12
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
Simplify automake include file for unittests #52
Comments
makefile jedi @leandro-lucarella-sociomantic https://github.com/sociomantic-tsunami/libdrizzle-redux/blob/master/tests/unit/include.am |
I don't understand what you have to do to add a new unit test, so |
Yes |
is the answer makd :) Makeit of course |
I think it might be less work to use something like: define add_unit_test
tests_unit_$1_SOURCES= tests/unit/$1.c
tests_unit_$1_LDADD= libdrizzle/libdrizzle-redux.la
nodist_EXTRA_tests_unit_$1_SOURCES = dummy.cxx
check_PROGRAMS+= tests/unit/$1
noinst_PROGRAMS+= tests/unit/$1
gdb-$1: tests/unit/$1
@$(GDB_COMMAND) tests/unit/$1
valgrind-$1: tests/unit/$1
@$(VALGRIND_COMMAND) tests/unit/$1
check-$1: tests/unit/$1
tests/unit/$1
endef
$(call exec,add_unit_test,connect)
$(call exec,add_unit_test,another_test)
# etc. Untested, and I'm not sure if you can use macros so lightly inside automake, but it might be worth trying... |
Or maybe you have to use it with |
TX luca, I will try out your suggestions |
Somewhat related to #95 |
Should this be closed now? Its listed as part of |
I would rather move it to future work. The addition of unittests is still a bit messy |
Adding a unittest currently requires manually adding several lines to the
include.am
. See belowA less redundant way of defining unittest make targets should be devised.
The text was updated successfully, but these errors were encountered: