From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id D87EF3938C12 for ; Thu, 11 Jun 2020 17:09:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D87EF3938C12 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=none smtp.mailfrom=mark@tarox.wildebeest.org Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id F087C30447FA; Thu, 11 Jun 2020 19:09:52 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id DDD614184B12; Thu, 11 Jun 2020 19:09:52 +0200 (CEST) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Mark Wielaard Subject: [COMMITTED] tests: Add GCOV flags when necessary. Date: Thu, 11 Jun 2020 19:09:48 +0200 Message-Id: <20200611170948.22040-1-mark@klomp.org> X-Mailer: git-send-email 2.18.4 X-Spam-Status: No, score=-39.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KHOP_HELO_FCRDNS, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 17:09:57 -0000 The nlist-test has a special compile rule, make sure it gets the GCOV flags when configuring with --enable-gcov. Signed-off-by: Mark Wielaard --- tests/ChangeLog | 4 ++++ tests/Makefile.am | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 99f9da9d..e5d9196b 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2020-06-11 Mark Wielaard + + * Makefile.am (nlist-test): Add GCOV flags when necessary. + 2020-06-06 Mark Wielaard * testfilesyms32.bz2: New test file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 7db7db16..53dd70a7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -80,13 +80,19 @@ backtrace-child-biarch$(EXEEXT): backtrace-child.c $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \ -o $@ $< +if GCOV +GCOV_FLAGS=-fprofile-arcs -ftest-coverage +else +GCOV_FLAGS= +endif + # test_nlist checks its own symbol table, and expects various symbols # to be in the order as specified in the source file. Explicitly set # minimal CFLAGS test-nlist$(EXEEXT): test-nlist.c $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(test_nlist_CFLAGS) $(test_nlist_LDADD) -o $@ $< + $(test_nlist_CFLAGS) $(GCOV_FLAGS) -o $@ $< $(test_nlist_LDADD) TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \ update1 update2 update3 update4 \ -- 2.18.4