[PATCH v1 1/2] CodeSamples: Add check target to CodeSamples/ and count/ Makefiles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Checking happens by running every program compiled from count/ without
arguments and checking if any failed.

In order to do that, introduce a 'check' target in
CodeSamples/count/Makefile.

Also, to allow further CodeSample testing in the future, make a global
'check' target on CodeSamples/Makefile.

Suggested-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
Signed-off-by: Leonardo Bras <leobras.c@xxxxxxxxx>
---
 CodeSamples/Makefile       | 3 +++
 CodeSamples/count/Makefile | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/CodeSamples/Makefile b/CodeSamples/Makefile
index 38143638..2a433a22 100644
--- a/CodeSamples/Makefile
+++ b/CodeSamples/Makefile
@@ -66,5 +66,8 @@ ifneq ($(strip $(target)),)
 	cat arch-$(target)/Makefile.arch >> Makefile.arch
 endif
 
+check:
+	make -C count/ check
+
 clean:
 	rm -f Makefile.arch api.h
diff --git a/CodeSamples/count/Makefile b/CodeSamples/count/Makefile
index f54edc8c..8d5d4296 100644
--- a/CodeSamples/count/Makefile
+++ b/CodeSamples/count/Makefile
@@ -90,5 +90,8 @@ count_stat_eventual: count_stat_eventual.c ../api.h counttorture.h
 count_tstat: count_tstat.c ../api.h counttorture.h
 	$(CC) $(GCC_ARGS) $(CFLAGS) -o count_tstat count_tstat.c -lpthread
 
+check: $(PROGS)
+	$(foreach prog, $(PROGS), ./$(prog);)
+
 clean:
 	rm -f $(PROGS)
-- 
2.39.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux