From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH v2 1/2] Add 'make check' and clang-check to build system
Date: Fri, 11 Jun 2021 16:17:51 +0200 [thread overview]
Message-ID: <YMNwj5509FviXCza@pevik> (raw)
In-Reply-To: <YMNqB2j57/b7ESJB@pevik>
Hi Richie,
> Hi Richie,
> one more proposal (addition to Metan's fix [1]):
> how about to add top level make check target:
> diff --git Makefile Makefile
> index 56812d77b..b65315618 100644
> --- Makefile
> +++ Makefile
> @@ -79,6 +79,7 @@ BOOTSTRAP_TARGETS := $(sort $(COMMON_TARGETS) $(CLEAN_TARGETS) $(INSTALL_TARGETS
> CLEAN_TARGETS := $(addsuffix -clean,$(CLEAN_TARGETS))
> INSTALL_TARGETS := $(addsuffix -install,$(INSTALL_TARGETS))
> MAKE_TARGETS := $(addsuffix -all,$(filter-out lib,$(COMMON_TARGETS)))
> +CHECK_TARGETS := $(addsuffix -check,testcases lib)
> # There's no reason why we should run `all' twice. Otherwise we're just wasting
> # 3+ mins of useful CPU cycles on a modern machine, and even more time on an
> @@ -99,6 +100,11 @@ INSTALL_DIR := $(abspath $(INSTALL_DIR))
> $(sort $(addprefix $(abs_top_builddir)/,$(BOOTSTRAP_TARGETS)) $(INSTALL_DIR) $(DESTDIR)/$(bindir)):
> mkdir -m 00755 -p "$@"
> +$(CHECK_TARGETS):
> + echo "CHECK_TARGETS: $(CHECK_TARGETS)"; \
This should be obviously left out (my debug message).
> + $(MAKE) -C "$(subst -check,,$@)" \
> + -f "$(abs_top_srcdir)/$(subst -check,,$@)/Makefile" all
This should be check target
-f "$(abs_top_srcdir)/$(subst -check,,$@)/Makefile" check
> +
> ## Pattern based subtarget rules.
> lib-install: lib-all
> @@ -189,6 +195,9 @@ INSTALL_TARGETS += $(addprefix $(DESTDIR)/$(bindir)/,$(BINDIR_INSTALL_SCRIPTS))
> $(INSTALL_TARGETS): $(INSTALL_DIR) $(DESTDIR)/$(bindir)
> +## Check
> +check: $(CHECK_TARGETS)
> +
> ## Install
> install: $(INSTALL_TARGETS)
> ---
+ there needs to be check added to RECURSIVE_TARGETS
+++ include/mk/generic_trunk_target.inc
@@ -48,7 +48,7 @@
include $(top_srcdir)/include/mk/functions.mk
-RECURSIVE_TARGETS ?= all install
+RECURSIVE_TARGETS ?= all install check
$(eval $(get_make_dirs))
---
Kind regards,
Petr
next prev parent reply other threads:[~2021-06-11 14:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 11:14 [LTP] [RFC PATCH v2 0/2] Libclang based analyzer Richard Palethorpe
2021-06-04 11:14 ` [LTP] [RFC PATCH v2 1/2] Add 'make check' and clang-check to build system Richard Palethorpe
2021-06-04 14:10 ` Petr Vorel
2021-06-04 14:11 ` Cyril Hrubis
2021-06-04 14:28 ` Richard Palethorpe
2021-06-04 14:33 ` Cyril Hrubis
2021-06-07 9:18 ` Joerg Vehlow
2021-06-07 9:12 ` Cyril Hrubis
2021-06-11 13:49 ` Petr Vorel
2021-06-11 14:17 ` Petr Vorel [this message]
2021-06-14 11:09 ` Richard Palethorpe
2021-06-04 11:14 ` [LTP] [RFC PATCH v2 2/2] Start libclang based analyzer and TEST() check Richard Palethorpe
2021-06-04 12:52 ` [LTP] [RFC PATCH v2 0/2] Libclang based analyzer Cyril Hrubis
2021-06-04 13:50 ` Richard Palethorpe
2021-06-07 8:37 ` Joerg Vehlow
2021-06-07 9:14 ` Cyril Hrubis
2021-06-07 10:20 ` Richard Palethorpe
2021-06-07 11:34 ` Joerg Vehlow
2021-06-07 13:42 ` Cyril Hrubis
2021-06-07 13:49 ` Richard Palethorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YMNwj5509FviXCza@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox