Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / GNUmakefile
blobdff627de8fab582688a6317fce8c0c25160a51d5
1 #!gmake
3 # Copyright (c) 2015-2016 Red Hat.
4 # Copyright (c) 1997-2002 Silicon Graphics, Inc. All Rights Reserved.
6 # NB: this GNUmakefile is only for use from within the PCP build tree. It governs
7 # only the packaging of the testsuite into the $PCP_VAR_DIR/testsuite directory.
8 # The nearby GNUmakefile.install file actually governs execution of the testsuite.
10 TOPDIR = ..
11 include $(TOPDIR)/src/include/builddefs
12 -include ./GNUlocaldefs
14 TESTDIR = $(PCP_VAR_DIR)/testsuite
15 TESTS = $(shell sed -n -e '/^[0-9]/s/:retired//' -e '/^[0-9][0-9]*:reserved/d' -e '/^[0-9]/s/[ ].*//' -e '/^[0-9]/p' <group)
17 SUBDIRS = src pmdas cisco gluster pconf sadist collectl nfsclient named \
18 archives views qt linux unbound cifs gpfs lustre ganglia \
19 postfix perl json slurm tmparch sheet systemd
20 ifeq "$(PMDA_PERFEVENT)" "true"
21 SUBDIRS += perfevent
22 endif
23 ifeq "$(HAVE_PYTHON)" "true"
24 SUBDIRS += secure mic
25 endif
26 LCONFIG = localconfig
28 # No implicit rules here, thank you
30 .SUFFIXES:
32 # and do nothing if NNN.out is older than NNN
34 %.out: %
36 default_pcp default: new remake check qa_outfiles $(OTHERS) $(SUBDIRS) $(LCONFIG)
37 $(SUBDIRS_MAKERULE)
39 setup: $(SUBDIRS) $(LCONFIG) qa_hosts
40 $(SUBDIRS_MAKERULE)
42 LDIRT += 051.work 134.full.* \
43 *.bak *.bad *.core *.full *.notrun *.raw *.o core a.out core.* \
44 *.log eek* urk* so_locations tmp.* gmon.out oss.qa.tar.gz \
45 *.full.ok *.new rc_cron_check.clean \
46 make.out qa_hosts qa_outfiles localconfig check.time
47 # these ones are links to the real files created when the associated
48 # test is run
49 LDIRT += $(shell [ -f .gitignore ] && grep '\.out$$' .gitignore)
51 SCRIPTS = mk.localconfig mk.pcpversion mk.qa_hosts mk.variant getpmcdhosts \
52 new check recheck remake findmetric group-stats changeversion \
53 check-gitignore check-group chk.setup show-me disk-work \
54 xlate_2_new_pmns common setup.051
56 COMMON_SCRIPTS = common.install.cisco common.pcpweb
57 COMMON = common.check common.config common.filter \
58 common.product common.rc common.setup \
59 common.secure common.gfs2 common.rpm \
60 common.qt common.avahi common.docker \
61 common.discovery common.compress common.webapi \
62 common.python
64 OTHERS = group qa_hosts.master README sanity.coverage \
65 $(shell echo valgrind-suppress*)
67 DOTOUTFILES = $(shell [ -f qa_outfiles ] && cat qa_outfiles || ls -1 | grep '^[0-9]' | grep -v '^[0-9][0-9][0-9]$$' | grep -v '^[0-9][0-9][0-9][0-9]$$' | egrep -v '^[0-9][0-9][0-9]*\.(full|out\.bad|notrun|work)' | tee qa_outfiles)
69 qa_outfiles:
70 @echo $(DOTOUTFILES) > qa_outfiles
72 qa_hosts: qa_hosts.master mk.qa_hosts
73 ./mk.qa_hosts
75 localconfig:
76 @echo PCP_PLATFORM=$(PCP_PLATFORM) > localconfig
77 ./mk.pcpversion $(PCP_VERSION) >> localconfig
79 install_pcp install: $(SUBDIRS)
80 ifeq (, $(filter mingw darwin freebsd netbsd openbsd solaris, $(TARGET_OS)))
81 $(INSTALL) -m 755 -d $(TESTDIR)
82 $(INSTALL) -m 755 $(TESTS) $(SCRIPTS) $(COMMON_SCRIPTS) $(TESTDIR)
83 $(INSTALL) -m 644 $(COMMON) $(OTHERS) $(TESTDIR)
84 $(INSTALL) -m 644 GNUmakefile.install $(TESTDIR)/GNUmakefile
85 $(INSTALL) -m 644 qa_outfiles $(DOTOUTFILES) $(TESTDIR)
86 $(SUBDIRS_MAKERULE)
87 endif
89 include $(BUILDRULES)
91 debug-me:
92 @echo TESTS=$(TESTS)
93 @echo SRCFILES=$(SRCFILES)
94 @echo CONFFILES=$(CONFFILES)
95 @echo SUBDIRS=$(SUBDIRS)