Commit Graph

69 Commits (master)

Author SHA1 Message Date
Alexander Larsson 82f2de0936 tests: dist the yaml test files 2018-04-26 15:31:58 +02:00
Alexander Larsson 9d1f1ed59c Delete non-builder files 2017-08-25 09:27:42 +02:00
Philip Withnall 9989188a1e tests: Add support for collection IDs to test-repo.sh
This adds variable support for collection IDs: they can either be
enabled on the server, on the server and client, or not at all. If
enabled on the server, apps and runtimes are built with collection IDs
and the repository has one set. If enabled on the client, the remote
config is added to the local repository with a collection ID and GPG
verification enabled. They are controlled with
USE_COLLECTIONS_IN_{SERVER,CLIENT}={yes,no}.

These variables are used in the new wrapper tests,
test-repo-collections.sh and test-repo-collections-server-only.sh.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Philip Withnall 19dbbd5f8c tests: Use AM_TESTS_ENVIRONMENT rather than TESTS_ENVIRONMENT
The latter is reserved for the user to set in their environment. The
former is what the makefile is supposed to set.

See
https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Philip Withnall e5e52b4b79 common/utils: Allow collection-id to be updated from repo config
In order to provide a transition path for repositories to add collection
IDs to themselves and propagate those collection IDs to clients’ remote
configurations, add another repo config key which controls whether the
repository’s collection ID is published. If xa.collection-id is set in
the repo’s published metadata, the client will update its configuration
to the given ID — but only if no ID is set already. This is a one-time
transition to prevent malicious repositories from remotely changing the
user’s configuration to associate their remote with a well-known
collection ID they don’t own.

Add a test for this.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Philip Withnall 4cb47a2112 tests: Add a test for unsigned summary support
This relies on peer to peer support also being enabled; the test is
skipped otherwise.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Philip Withnall f47a696392 build: Add AM_* variables to all per-target special variables
For example, add $(AM_CFLAGS) to mumble_CFLAGS. Since $(WARN_CFLAGS) is
only added to $(AM_CFLAGS), this fixes the lack of inclusion of the
compiler warning flags in the compilation of half of flatpak.

Note that $(AM_*) variables are only used by automake if a more specific
(per-target) special variable is not defined instead. So if you define
mumble_CFLAGS, AM_CFLAGS will not be used for that target unless
explicitly included in mumble_CFLAGS.

See
https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html.

Do the same for $(AM_LIBADD), $(AM_LDFLAGS), etc. These are not
currently defined, but it’s good practice to include them in
mumble_LIBADD (etc.) just in case they’re defined in future. Hopefully
their inclusions will be cargo-culted to any new targets which are
added, retaining full coverage of the code base.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-06 15:05:58 +01:00
Philip Chimento 86bc5f39be builder: Use build-args during cleanup
Any build-args specified in the manifest should be used during the
cleanup and platform-cleanup stages. This is because if you are using
QEMU to build for another architecture, for example, you need to pass
--bind-mount in the build-args, and the bind mount also needs to be
present while running cleanup commands.
2017-06-30 10:23:52 +02:00
Alexander Larsson bc7ebd20e2 builder: Allow .pyc files without .py
This is common for binary-only releases, for example as described
in:
https://lists.freedesktop.org/archives/flatpak/2017-June/000697.html
2017-06-13 11:17:06 +02:00
Simon McVittie 37e52409aa Don't distribute gdbus-codegen-generated source in tarballs 2017-06-05 21:53:17 +01:00
Alexander Larsson d2c51a8553 Fix installation of test-keyring2 2017-05-23 14:32:46 +02:00
Alexander Larsson 6fb15f4f76 Dist test-keyring2 dir 2017-05-23 12:08:23 +02:00
Alexander Larsson 2f533f3a68 tests: run test-repo.sh with system repo too 2017-05-10 11:54:27 +02:00
Alexander Larsson b09185c356 tests: Add new test-repo.sh with initial GPG tests
This just ensures we can install from GPG and non-GPG repos
and we can't install with missing on wrong GPG key.
2017-05-10 11:54:27 +02:00
Alexander Larsson c053c49ead Extend flatpak-builder test
We now test including modules, including doing
so recursively, and find patches and source files from
those.
2017-04-24 10:04:23 +02:00
Alexander Larsson 32eb260d24 Stop using ostree trivial-httpd
This isn't always available in recent ostree.
This work is based on https://github.com/flatpak/flatpak/pull/658 and
fixes https://github.com/ostreedev/ostree/pull/723
2017-03-27 12:30:38 +02:00
Simon McVittie dd96ac54f1 tests: Install testpython.py executable
The test that uses this file executes it. Install it as an extra
script rather than data to ensure that it can work.
2017-01-18 08:41:03 +01:00
Alexander Larsson 9ddc4aca48 Support flatpak install --oci to install apps from OCI 2016-12-12 16:22:16 +01:00
Matt Watson 36e844af56 tests: don't stomp on LD_LIBRARY_PATH
We should append to it, but not totally replace it, or things like
running test under jhbuild will not work properly.
2016-11-17 16:34:30 +01:00
Simon McVittie c9a6da7fe5 Use dist_installed_test_data instead of installed_test_data
This means we don't have to add it to EXTRA_DIST, and also means
we can have generated (non-distributed) test data in future if we
want to.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-09-07 17:03:32 +01:00
Simon McVittie 1cdc43c8fa Make empty-configure executable when it is installed
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-09-07 17:03:19 +01:00
Simon McVittie 1769f8e8dc Tell build-time tests which bwrap we are going to use
In autobuilder environments that deprive the build of capabilities,
it is entirely possible that we have a system bwrap(1) but cannot
run it, for example because CAP_SYS_ADMIN has been excluded from
the capability bounding set. Tell the tests which bwrap we are
going to run, so we can run it in a simpler way and see whether
it works.

Debian's sbuild autobuilder currently suffers from a different
issue in which pivot_root(2) returns EINVAL, possibly caused by
sbuild being chroot-based and so not having the mount point
structure that is required for pivot_root. This avoids the
problematic build-time tests there too; they work on ci.debian.net,
which uses lxc instead of chroots, and in virtual machines.

Because $(BWRAP) might be non-absolute, we need to search PATH for it.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-09-07 17:02:04 +01:00
Alexander Larsson 84c7328af8 Remove double-listing of testpython.py in Makefile 2016-08-11 07:39:38 +02:00
Alexander Larsson 9c57a5751e Add test for python .pyc/.pyo rewriting
This catches regressions in the fix in the previous commit, where old
stale .py[oc] files can wrongly become "unstale" when we change the
.py file mtime to 1.
2016-08-10 16:24:18 +02:00
Matthias Clasen 66507c9bf1 Stop mentioning test-library.sh
It is not needed.
2016-08-03 18:05:59 -04:00
Matthias Clasen 109e6984e8 tests: Add library tests
Add a test binary that sets up a remote and exercises some of
the library apis against it.
2016-08-01 23:05:05 -04:00
Alexander Larsson f1a2f30e41 Add tests for extensions 2016-06-29 12:54:08 +02:00
Alexander Larsson ab64f70c59 tests: Test install/updates with static deltas 2016-06-28 17:36:54 +02:00
Bastien Nocera b9da048096 tests: Add test for "use-git" patch application 2016-06-28 15:23:44 +02:00
Simon McVittie ee99e8afff Add BWRAP and --with-system-bubblewrap configure arguments
This lets distributors share a system copy of bubblewrap (>= 0.1.0)
between Flatpak and any other projects that benefit from it, if they are
careful to keep new versions in sync. The default is still to use the
bundled submodule, ensuring compatibility and simplifying dependencies.

Enable $PATH search everywhere that runs bwrap, so that $BWRAP doesn't
necessarily need to be a fully-qualified path.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-26 11:09:03 +01:00
Simon McVittie c59fba9be3 tests: don't treat helper scripts as though they were tests
We shouldn't install .test metadata for these, and run them as TAP
test scripts. In glib-tap.mk jargon that makes them "extra scripts".

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-25 00:45:09 +01:00
Simon McVittie ee77be10b5 tests: clean up what is distributed
Listing variables whose values are conditional in EXTRA_DIST is
problematic: if Flatpak was configured without installed-tests,
we would not distribute those files. This is a problem during
distcheck, where installed-tests are disabled.

For files not placed in a special subdirectory, glib-tap.mk handles
this for us. For the keyring and the databases, we have to do it
ourselves, by arranging for them to be in a dist_ variable that is
special to Automake - when determining what to distribute, Automake
includes anything that is selected for distribution under any
combination of conditionals.

While I'm here, include test keyring's README in tarballs: its advice
is equally applicable in a tarball release.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-12 10:35:13 +01:00
Alexander Larsson 528b150162 Update valgrind test support 2016-06-10 12:59:11 +02:00
Alexander Larsson 1667f988de Add test-bundle-system
This tests installing a bundle via the system-helper.
2016-06-03 16:04:10 +02:00
Alexander Larsson 95dfd2f459 Add test for bundles 2016-06-03 14:30:25 +02:00
David King fc6282e865 bwrap: Move to under libexecdir
According to the FHS, applications which place internal libraries in
/usr/libexec should not also use /usr/lib for this purpose:

http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html

As several flatpak helpers are already installed in libexecdir, move
the bwrap helper to /usr/libexec/flatpak-bwrap.
2016-05-30 18:40:12 +02:00
Alexander Larsson c6486d01a2 tests: Fix distcheck
Don't clean out the test files on a regular clean.
2016-05-18 10:45:16 +02:00
Alexander Larsson 4af71aae7b Fix distcheck: clean up some more generated files 2016-05-18 10:30:47 +02:00
Alexander Larsson d961290d40 tests: EXTRA_DIST the test keyrings 2016-05-18 10:16:59 +02:00
Simon McVittie 4828632456 test-doc-portal: rely on G_TEST_BUILDDIR to find services
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-05-17 17:59:04 +02:00
Simon McVittie 513f795c65 testdb: rely on G_TEST_SRCDIR to find databases
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-05-17 17:57:24 +02:00
Simon McVittie a7a49065a7 Don't install non-executable test files executable
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-05-17 17:55:42 +02:00
Alexander Larsson aa11387031 tests: Add test-run-system.sh 2016-05-17 17:49:55 +02:00
Alexander Larsson f36a57b3b1 tests: Use gpg signatures during test 2016-05-17 13:04:44 +02:00
Alexander Larsson 28b549156a Split out permission store from session helper
This is now available as org.freedesktop.impl.portal.PermissionStore
2016-05-09 14:07:22 +02:00
Alexander Larsson 8abbc0186e Rename everything but the on-disk location to flatpak 2016-05-09 11:11:55 +02:00
Alexander Larsson ba37b22d78 Rename library to libflatpak 2016-05-09 09:46:26 +02:00
Alexander Larsson 6a613d1fab Rename all non-autogenerated symbols to flatpak 2016-05-09 09:00:20 +02:00
Alexander Larsson 663cfcf3a8 Fix make check if uninstalled
This uses various environment variables set during make check
to find the trigger, bwrap and xdg-app-dbusproxy from the build/source dir
rather than the installed location.
2016-05-03 10:27:36 +02:00
Alexander Larsson 1df3e4845b Fix various distcheck issues 2016-05-03 09:36:33 +02:00