tests/Makefile.am
author J. Ali Harlow <ali@juiblex.co.uk>
Tue Jun 28 19:46:19 2016 +0100 (2016-06-28)
changeset 54 bed9ffa7f33a
parent 44 43ffed8669ce
child 55 8c80282a3888
permissions -rw-r--r--
Release 0.5.2.51
     1 SUBDIRS = . plover plover-gtk
     2 
     3 EXTRA_DIST = zsh.spec zsh2.spec zip.spec zap.spec filesystem.spec zappy.spec \
     4     zappy2.spec unsatisfiable.spec uninstallable.spec badpostun.spec comps.xml \
     5     glib.supp.in README xvfb-run
     6 
     7 pkg_V_rpmbuild = $(pkg_v_rpmbuild_$(V))
     8 pkg_v_rpmbuild_ = $(pkg_v_rpmbuild_$(AM_DEFAULT_VERBOSITY))
     9 pkg_v_rpmbuild_0 = --quiet
    10 
    11 BUILD_RPM = $(RPMBUILD) $(pkg_V_rpmbuild) --define "_topdir `pwd`/rpmbuild" -bb
    12 
    13 if HAVE_CHECK_TOOLS
    14 
    15 noinst_DATA = glib.supp yum-repo-test-dir/repodata/primary.xml.gz \
    16 	primary.xml.gz razor-test-dir/var/lib/razor/system.rzdb
    17 
    18 if HAVE_VALGRIND_3_9
    19 %.supp: %.supp.in
    20 	cat $< > $@
    21 else
    22 %.supp: %.supp.in
    23 	grep -v '^ *match-leak-kinds: ' $< > $@
    24 endif
    25 
    26 yum-repo-test-dir/repodata/primary.xml.gz: zsh.spec zsh2.spec zip.spec \
    27     zap.spec filesystem.spec zappy.spec zappy2.spec unsatisfiable.spec \
    28     uninstallable.spec badpostun.spec Makefile
    29 	rm -rf rpmbuild yum-repo-test-dir
    30 	mkdir -p rpmbuild/BUILD rpmbuild/RPMS
    31 	$(BUILD_RPM) $(srcdir)/zap.spec
    32 	$(BUILD_RPM) --define "_version 1" $(srcdir)/zip.spec
    33 	$(BUILD_RPM) $(srcdir)/zsh.spec
    34 	$(BUILD_RPM) $(srcdir)/zsh2.spec
    35 	$(BUILD_RPM) $(srcdir)/filesystem.spec
    36 	$(BUILD_RPM) $(srcdir)/zappy.spec
    37 	$(BUILD_RPM) $(srcdir)/zappy2.spec
    38 	$(BUILD_RPM) $(srcdir)/unsatisfiable.spec
    39 	$(BUILD_RPM) $(srcdir)/uninstallable.spec
    40 	$(BUILD_RPM) $(srcdir)/badpostun.spec
    41 	mkdir -p yum-repo-test-dir/rpms
    42 	mv rpmbuild/RPMS/noarch/*.rpm yum-repo-test-dir/rpms
    43 	rm -rf rpmbuild
    44 	cp $(srcdir)/comps.xml yum-repo-test-dir/rpms
    45 	$(CREATEREPO) --simple-md-filenames -g comps.xml -o yum-repo-test-dir \
    46 	  yum-repo-test-dir/rpms
    47 	$(RM) yum-repo-test-dir/rpms/comps.xml
    48 	cp $(srcdir)/comps.xml yum-repo-test-dir/repodata
    49 
    50 primary.xml.gz: yum-repo-test-dir/repodata/primary.xml.gz
    51 	cp yum-repo-test-dir/repodata/primary.xml.gz \
    52 	  yum-repo-test-dir/repodata/filelists.xml.gz .
    53 	rm -rf rpms
    54 	ln -s yum-repo-test-dir/rpms .
    55 
    56 razor-test-dir/var/lib/razor/system.rzdb: primary.xml.gz
    57 	$(RM) -r razor-test-dir
    58 	$(RAZOR) --root=file:razor-test-dir init
    59 	$(RAZOR) --root=file:razor-test-dir \
    60 	  --url=file://localhost/`pwd`/yum-repo-test-dir import-yum
    61 	$(RAZOR) --root=file:razor-test-dir install zap zappy zappy2 zappy-tools
    62 
    63 endif
    64 
    65 check-valgrind:
    66 	$(RM) test-suite-*.log
    67 	-(cd plover && $(MAKE) $(AM_MAKEFLAGS) check-valgrind)
    68 	-(cd plover-gtk && $(MAKE) $(AM_MAKEFLAGS) check-valgrind)
    69 	@for infile in plover/test-suite-*.log plover-gtk/test-suite-*.log; do \
    70 	    outfile=`echo $$infile | sed -e 's:.*/::'`; \
    71 	    cat $$infile >> $$outfile; \
    72 	done
    73 
    74 clean-local:
    75 	rm -rf yum-repo-test-dir razor-test-dir
    76 	rm -f primary.xml.gz filelists.xml.gz rpms rawhide.rzdb
    77 
    78 CLEANFILES = glib.supp