tests/Makefile.am
author J. Ali Harlow <ali@juiblex.co.uk>
Sat Jul 16 11:07:18 2016 +0100 (2016-07-16)
changeset 61 31fb35727621
parent 55 8c80282a3888
child 87 5914de4a823f
permissions -rw-r--r--
Support parallel installations. The idea is that for CAD screener, we want
to be able to install this on the same machine as a standard AVOT setup
(most notably for John's laptop). To allow for the possibility of a second
application that might have the same requirements, we add the concept of
vendor-specific distributions. Thus we can have one distribution for CAD
screener and one for The Next Big Thing. It doesn't seem trivial to have
both CAD screener and AVOT under the same vendor tag so we'll have to have
AVOT under "City Occupational" and CAD screener under "City Occupational Ltd"
or some such kludge.

Most of this is done although we are very short of test cases (in particular
we don't test that it's actually possible to install CAD screener in parallel
with AVOT or to update either of them once installed, which is fundamental).

We also have a lot of baggage left over, including an intercept of razor_set.
The problem that this was introduced to debug has been fixed but it looks
like there are a number of memory leaks which it might be useful to help
track down so it has been left in place for now.

There is still a lot of confusion in plover between path-based and URI-based
API. We should review the API, decide what we want and have a general clear up.

There is also confusion as to the purpose of RAZOR_ROOT (and meaning; path or
URI). This is not used at all in librazor (although it is used in razor.exe).
Ideally we shouldn't use it in plover or plover-gtk either although again, we
might want to support it or an equivalent in (some of) the various executables.

Work that would still to nice to do for CAD screener:

- uninstall (ideally as an installed program that hooks into Add/Remove programs
but even re-running the installer would be acceptable).
- xz support (smaller packages).
- repomd.xml and xml:base (would be needed for an Internet installer).
- graphical installer.
ali@38
     1
SUBDIRS = . plover plover-gtk
ali@38
     2
ali@38
     3
EXTRA_DIST = zsh.spec zsh2.spec zip.spec zap.spec filesystem.spec zappy.spec \
ali@38
     4
    zappy2.spec unsatisfiable.spec uninstallable.spec badpostun.spec comps.xml \
ali@61
     5
    distribution-local-comps.xml glib.supp.in README xvfb-run
ali@38
     6
ali@51
     7
pkg_V_rpmbuild = $(pkg_v_rpmbuild_$(V))
ali@51
     8
pkg_v_rpmbuild_ = $(pkg_v_rpmbuild_$(AM_DEFAULT_VERBOSITY))
ali@51
     9
pkg_v_rpmbuild_0 = --quiet
ali@51
    10
ali@51
    11
BUILD_RPM = $(RPMBUILD) $(pkg_V_rpmbuild) --define "_topdir `pwd`/rpmbuild" -bb
ali@51
    12
ali@38
    13
if HAVE_CHECK_TOOLS
ali@38
    14
ali@38
    15
noinst_DATA = glib.supp yum-repo-test-dir/repodata/primary.xml.gz \
ali@61
    16
	distribution-local-test-dir/repodata/primary.xml.gz \
ali@61
    17
	razor-test-dir/var/lib/razor/system.rzdb
ali@38
    18
ali@38
    19
if HAVE_VALGRIND_3_9
ali@38
    20
%.supp: %.supp.in
ali@38
    21
	cat $< > $@
ali@38
    22
else
ali@38
    23
%.supp: %.supp.in
ali@38
    24
	grep -v '^ *match-leak-kinds: ' $< > $@
ali@38
    25
endif
ali@38
    26
ali@61
    27
distribution-local-test-dir/repodata/primary.xml.gz: filesystem.spec \
ali@61
    28
    zappy.spec Makefile
ali@61
    29
	rm -rf rpmbuild distribution-local-test-dir
ali@61
    30
	mkdir -p rpmbuild/BUILD rpmbuild/RPMS
ali@61
    31
	$(BUILD_RPM) $(srcdir)/filesystem.spec
ali@61
    32
	$(BUILD_RPM) $(srcdir)/zappy.spec
ali@61
    33
	mkdir -p distribution-local-test-dir/Packages
ali@61
    34
	mv rpmbuild/RPMS/noarch/*.rpm distribution-local-test-dir/Packages
ali@61
    35
	rm -rf rpmbuild
ali@61
    36
	cp $(srcdir)/distribution-local-comps.xml \
ali@61
    37
	  distribution-local-test-dir/comps.xml
ali@61
    38
	$(CREATEREPO) --simple-md-filenames -g comps.xml \
ali@61
    39
	  distribution-local-test-dir
ali@61
    40
	mv distribution-local-test-dir/comps.xml \
ali@61
    41
	  distribution-local-test-dir/repodata
ali@61
    42
ali@38
    43
yum-repo-test-dir/repodata/primary.xml.gz: zsh.spec zsh2.spec zip.spec \
ali@38
    44
    zap.spec filesystem.spec zappy.spec zappy2.spec unsatisfiable.spec \
ali@38
    45
    uninstallable.spec badpostun.spec Makefile
ali@38
    46
	rm -rf rpmbuild yum-repo-test-dir
ali@38
    47
	mkdir -p rpmbuild/BUILD rpmbuild/RPMS
ali@51
    48
	$(BUILD_RPM) $(srcdir)/zap.spec
ali@51
    49
	$(BUILD_RPM) --define "_version 1" $(srcdir)/zip.spec
ali@51
    50
	$(BUILD_RPM) $(srcdir)/zsh.spec
ali@51
    51
	$(BUILD_RPM) $(srcdir)/zsh2.spec
ali@51
    52
	$(BUILD_RPM) $(srcdir)/filesystem.spec
ali@51
    53
	$(BUILD_RPM) $(srcdir)/zappy.spec
ali@51
    54
	$(BUILD_RPM) $(srcdir)/zappy2.spec
ali@51
    55
	$(BUILD_RPM) $(srcdir)/unsatisfiable.spec
ali@51
    56
	$(BUILD_RPM) $(srcdir)/uninstallable.spec
ali@51
    57
	$(BUILD_RPM) $(srcdir)/badpostun.spec
ali@55
    58
	mkdir -p yum-repo-test-dir/Packages
ali@55
    59
	mv rpmbuild/RPMS/noarch/*.rpm yum-repo-test-dir/Packages
ali@38
    60
	rm -rf rpmbuild
ali@55
    61
	cp $(srcdir)/comps.xml yum-repo-test-dir
ali@55
    62
	$(CREATEREPO) --simple-md-filenames -g comps.xml yum-repo-test-dir
ali@55
    63
	mv yum-repo-test-dir/comps.xml yum-repo-test-dir/repodata
ali@38
    64
ali@61
    65
razor-test-dir/var/lib/razor/system.rzdb: yum-repo-test-dir/repodata/primary.xml.gz
ali@38
    66
	$(RM) -r razor-test-dir
ali@44
    67
	$(RAZOR) --root=file:razor-test-dir init
ali@55
    68
	$(RAZOR) --url=file://localhost`pwd`/yum-repo-test-dir \
ali@55
    69
	  --root=file:razor-test-dir import-yum
ali@55
    70
	$(RAZOR) --url=file://localhost`pwd`/yum-repo-test-dir \
ali@55
    71
	  --root=file:razor-test-dir install zap zappy zappy2 zappy-tools
ali@38
    72
ali@38
    73
endif
ali@38
    74
ali@38
    75
check-valgrind:
ali@38
    76
	$(RM) test-suite-*.log
ali@38
    77
	-(cd plover && $(MAKE) $(AM_MAKEFLAGS) check-valgrind)
ali@38
    78
	-(cd plover-gtk && $(MAKE) $(AM_MAKEFLAGS) check-valgrind)
ali@38
    79
	@for infile in plover/test-suite-*.log plover-gtk/test-suite-*.log; do \
ali@38
    80
	    outfile=`echo $$infile | sed -e 's:.*/::'`; \
ali@38
    81
	    cat $$infile >> $$outfile; \
ali@38
    82
	done
ali@38
    83
ali@38
    84
clean-local:
ali@61
    85
	rm -rf yum-repo-test-dir distribution-local-test-dir razor-test-dir
ali@61
    86
	rm -f rawhide.rzdb
ali@38
    87
ali@38
    88
CLEANFILES = glib.supp