All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v5 2/4] make: Add make test{, -c, -shell} targets
Date: Wed, 14 Jul 2021 16:19:59 +0200	[thread overview]
Message-ID: <20210714142001.20566-3-pvorel@suse.cz> (raw)
In-Reply-To: <20210714142001.20566-1-pvorel@suse.cz>

For testing C and shell API.

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 Makefile | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/Makefile b/Makefile
index 56812d77b..ff4a70eec 100644
--- a/Makefile
+++ b/Makefile
@@ -192,6 +192,29 @@ $(INSTALL_TARGETS): $(INSTALL_DIR) $(DESTDIR)/$(bindir)
 ## Install
 install: $(INSTALL_TARGETS)
 
+## Test
+define _test
+	@set -e; $(top_srcdir)/lib/newlib_tests/runtest.sh -b $(abs_builddir) $(1)
+endef
+
+test: lib-all
+ifneq ($(build),$(host))
+	$(error running tests on cross-compile build not supported)
+endif
+	$(call _test)
+
+test-c: lib-all
+ifneq ($(build),$(host))
+	$(error running tests on cross-compile build not supported)
+endif
+	$(call _test,-c)
+
+test-shell: lib-all
+ifneq ($(build),$(host))
+	$(error running tests on cross-compile build not supported)
+endif
+	$(call _test,-s)
+
 ## Help
 .PHONY: help
 help:
-- 
2.32.0


  parent reply	other threads:[~2021-07-14 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 14:19 [LTP] [PATCH v5 0/4] Run tests in CI Petr Vorel
2021-07-14 14:19 ` [LTP] [PATCH v5 1/4] lib: Add script for running tests Petr Vorel
2021-07-14 14:19 ` Petr Vorel [this message]
2021-07-14 14:20 ` [LTP] [PATCH v5 3/4] build.sh: Add support for make test Petr Vorel
2021-07-14 14:20 ` [LTP] [PATCH v5 4/4] CI: Run also " Petr Vorel
2021-07-14 14:27 ` [LTP] [PATCH v5 0/4] Run tests in CI Petr Vorel
2021-07-14 15:00   ` Cyril Hrubis
2021-07-14 16:43     ` Petr Vorel
2021-07-15  7:38       ` Petr Vorel
2021-07-15  7:48         ` Petr Vorel
2021-07-15  8:51         ` Cyril Hrubis
2021-07-15  9:22           ` Petr Vorel

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=20210714142001.20566-3-pvorel@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.