tests/Makefile.am
author J. Ali Harlow <ali@juiblex.co.uk>
Fri Jun 08 17:05:27 2018 +0100 (2018-06-08)
changeset 76 7a98a5020c44
parent 55 8c80282a3888
child 87 5914de4a823f
permissions -rw-r--r--
Fix bug where summary page could not be confirmed when no comps file in use
     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     distribution-local-comps.xml 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 	distribution-local-test-dir/repodata/primary.xml.gz \
    17 	razor-test-dir/var/lib/razor/system.rzdb
    18 
    19 if HAVE_VALGRIND_3_9
    20 %.supp: %.supp.in
    21 	cat $< > $@
    22 else
    23 %.supp: %.supp.in
    24 	grep -v '^ *match-leak-kinds: ' $< > $@
    25 endif
    26 
    27 distribution-local-test-dir/repodata/primary.xml.gz: filesystem.spec \
    28     zappy.spec Makefile
    29 	rm -rf rpmbuild distribution-local-test-dir
    30 	mkdir -p rpmbuild/BUILD rpmbuild/RPMS
    31 	$(BUILD_RPM) $(srcdir)/filesystem.spec
    32 	$(BUILD_RPM) $(srcdir)/zappy.spec
    33 	mkdir -p distribution-local-test-dir/Packages
    34 	mv rpmbuild/RPMS/noarch/*.rpm distribution-local-test-dir/Packages
    35 	rm -rf rpmbuild
    36 	cp $(srcdir)/distribution-local-comps.xml \
    37 	  distribution-local-test-dir/comps.xml
    38 	$(CREATEREPO) --simple-md-filenames -g comps.xml \
    39 	  distribution-local-test-dir
    40 	mv distribution-local-test-dir/comps.xml \
    41 	  distribution-local-test-dir/repodata
    42 
    43 yum-repo-test-dir/repodata/primary.xml.gz: zsh.spec zsh2.spec zip.spec \
    44     zap.spec filesystem.spec zappy.spec zappy2.spec unsatisfiable.spec \
    45     uninstallable.spec badpostun.spec Makefile
    46 	rm -rf rpmbuild yum-repo-test-dir
    47 	mkdir -p rpmbuild/BUILD rpmbuild/RPMS
    48 	$(BUILD_RPM) $(srcdir)/zap.spec
    49 	$(BUILD_RPM) --define "_version 1" $(srcdir)/zip.spec
    50 	$(BUILD_RPM) $(srcdir)/zsh.spec
    51 	$(BUILD_RPM) $(srcdir)/zsh2.spec
    52 	$(BUILD_RPM) $(srcdir)/filesystem.spec
    53 	$(BUILD_RPM) $(srcdir)/zappy.spec
    54 	$(BUILD_RPM) $(srcdir)/zappy2.spec
    55 	$(BUILD_RPM) $(srcdir)/unsatisfiable.spec
    56 	$(BUILD_RPM) $(srcdir)/uninstallable.spec
    57 	$(BUILD_RPM) $(srcdir)/badpostun.spec
    58 	mkdir -p yum-repo-test-dir/Packages
    59 	mv rpmbuild/RPMS/noarch/*.rpm yum-repo-test-dir/Packages
    60 	rm -rf rpmbuild
    61 	cp $(srcdir)/comps.xml yum-repo-test-dir
    62 	$(CREATEREPO) --simple-md-filenames -g comps.xml yum-repo-test-dir
    63 	mv yum-repo-test-dir/comps.xml yum-repo-test-dir/repodata
    64 
    65 razor-test-dir/var/lib/razor/system.rzdb: yum-repo-test-dir/repodata/primary.xml.gz
    66 	$(RM) -r razor-test-dir
    67 	$(RAZOR) --root=file:razor-test-dir init
    68 	$(RAZOR) --url=file://localhost`pwd`/yum-repo-test-dir \
    69 	  --root=file:razor-test-dir import-yum
    70 	$(RAZOR) --url=file://localhost`pwd`/yum-repo-test-dir \
    71 	  --root=file:razor-test-dir install zap zappy zappy2 zappy-tools
    72 
    73 endif
    74 
    75 check-valgrind:
    76 	$(RM) test-suite-*.log
    77 	-(cd plover && $(MAKE) $(AM_MAKEFLAGS) check-valgrind)
    78 	-(cd plover-gtk && $(MAKE) $(AM_MAKEFLAGS) check-valgrind)
    79 	@for infile in plover/test-suite-*.log plover-gtk/test-suite-*.log; do \
    80 	    outfile=`echo $$infile | sed -e 's:.*/::'`; \
    81 	    cat $$infile >> $$outfile; \
    82 	done
    83 
    84 clean-local:
    85 	rm -rf yum-repo-test-dir distribution-local-test-dir razor-test-dir
    86 	rm -f rawhide.rzdb
    87 
    88 CLEANFILES = glib.supp