Skip to content

Commit

Permalink
[test] Rename test-symbols to check-symbols
Browse files Browse the repository at this point in the history
Shows undocumented symbols.
  • Loading branch information
behdad committed May 27, 2011
1 parent 376dafa commit 18bced1
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions test/Makefile.am
Expand Up @@ -51,21 +51,7 @@ test_object_LIBS = $(LDADD) $(FREETYPE_LIBS)
endif endif




# test-symbols: Finds untested API symbols # Default test running environment
symbols-tested.txt: $(TEST_PROGS)
$(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
| grep ' U hb_' | sed 's/.* U hb_/hb_/' \
| sort | uniq > $@.tmp && mv $@.tmp $@
symbols-exported.txt: $(top_builddir)/src/.libs/libharfbuzz.so
$(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
| grep ' T ' | sed 's/.* T //' | grep -v '^\(_init\|_fini\)$$' \
| sort | uniq > $@.tmp && mv $@.tmp $@
symbols-untested.txt: symbols-tested.txt symbols-exported.txt
$(AM_V_GEN)diff $^ > $@.tmp; mv $@.tmp $@
CLEANFILES += symbols-tested.txt symbols-exported.txt symbols-untested.txt
test-symbols: symbols-untested.txt
@! cat $^ | grep .

TESTS = $(TEST_PROGS) TESTS = $(TEST_PROGS)
TESTS_ENVIRONMENT = \ TESTS_ENVIRONMENT = \
MALLOC_CHECK_=2 \ MALLOC_CHECK_=2 \
Expand All @@ -74,6 +60,7 @@ TESTS_ENVIRONMENT = \
G_SLICE=always-malloc \ G_SLICE=always-malloc \
$(ENV) $(ENV)



# check-tool: Run tests under $(TOOL) # check-tool: Run tests under $(TOOL)
check-tool: check-tool:
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
Expand All @@ -90,6 +77,7 @@ GTESTER = gtester
check-gtester: check-gtester:
$(AM_V_at)$(MAKE) $(AM_MAKEFLGS) check-tool-raw TOOL="$(GTESTER) --verbose" $(AM_V_at)$(MAKE) $(AM_MAKEFLGS) check-tool-raw TOOL="$(GTESTER) --verbose"



# Check tests under valgrind. Saves log to valgrind-log # Check tests under valgrind. Saves log to valgrind-log
VALGRIND_FLAGS = \ VALGRIND_FLAGS = \
--tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \ --tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \
Expand All @@ -108,12 +96,29 @@ check-valgrind:
2>&1 | tee valgrind-log $(valgrind_verbose) 2>&1 | tee valgrind-log $(valgrind_verbose)




# check-symbols: Finds untested API symbols
symbols-tested.txt: $(TEST_PROGS)
$(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
| grep ' U hb_' | sed 's/.* U hb_/hb_/' \
| sort | uniq > $@.tmp && mv $@.tmp $@
symbols-exported.txt: $(top_builddir)/src/.libs/libharfbuzz.so
$(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
| grep ' T ' | sed 's/.* T //' | grep -v '^\(_init\|_fini\)$$' \
| sort | uniq > $@.tmp && mv $@.tmp $@
symbols-untested.txt: symbols-tested.txt symbols-exported.txt
$(AM_V_GEN)diff $^ > $@.tmp; mv $@.tmp $@
CLEANFILES += symbols-tested.txt symbols-exported.txt symbols-untested.txt
check-symbols: symbols-untested.txt
@! cat $^ | grep .



else else
check-am: check-am:
@echo "You need to have glib support enabled to run the tests" @echo "You need to have glib support enabled to run the tests"
@exit 77 @exit 77
endif endif


.PHONY: test-symbols check-tool check-valgrind .PHONY: check-symbols check-tool check-valgrind


-include $(top_srcdir)/git.mk -include $(top_srcdir)/git.mk

0 comments on commit 18bced1

Please sign in to comment.