Commit Graph

123 Commits

Author SHA1 Message Date
Alexander Larsson
cc85b93584 build-finish: Add --require-version and handling of it
This means that clients will refuse to install or update to your
new app if the flatpak version they are using is too old.
2016-12-14 13:48:51 +01:00
Alexander Larsson
9ddc4aca48 Support flatpak install --oci to install apps from OCI 2016-12-12 16:22:16 +01:00
Alexander Larsson
439d5fb554 leak tests: Add various suppressions to make most non-flatpak things go away 2016-11-28 17:24:02 +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
Alexander Larsson
25483378a9 tests: Run flatpak-builder under valgrind too 2016-10-26 21:43:32 +02:00
Alexander Larsson
eb92727f65 tests: Add some more verification to the bundle tests 2016-10-21 10:30:20 +02:00
Alexander Larsson
944c1d58c7 tests: Add suppression for ostree static delta valgrind issue
I filed this upstream as:
 https://github.com/ostreedev/ostree/issues/533

Lets ignore it for now so we can use valgrind tests for the flatpak
parts.
2016-10-19 13:21:29 +02:00
Alexander Larsson
5e4f46f9c2 tests: Make the valgrind based checks default to not checking for leaks
Use FLATPAK_TESTS_VALGRIND_LEAKS to check for leaks.
We're not currently passing the leak checks, so this helps letting
us make valgrind checks useful.
2016-10-19 13:13:30 +02:00
Alexander Larsson
6345f0bae7 build-finish: Support exporting more than hicolor icons
We really want apps to be able to export e.g. HighContrast icons too.
2016-10-18 10:14:10 +02:00
Simon McVittie
57bfce9a55 Terminate gpg-agent after using it for tests
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-09-07 22:08:03 +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
9f52d50448 make-test-runtime: cope with Debian's Python 2.7 configuration
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-09-07 17:02:53 +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
Simon McVittie
a5d70667b2 test_install_launch_uninstall: consistently check for GError first
An assertion failure that says res is FALSE is a lot less useful
than an assertion failure that says we got a specific GError.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-09-07 17:01:35 +01:00
Alexander Larsson
6e37155a3e testlibrary: Skip launch test is bwrap is not supported 2016-08-29 12:32:31 +02:00
Alexander Larsson
b1fcf792e1 testlibrary: Include libglnx before flatpak.h
This makes the code use the backport of g_auot* so that we can build
against older versions of glib.
2016-08-29 11:01:05 +02:00
Alexander Larsson
78dae42509 Set MALLOC_CHECK_ and MALLOC_PERTURB_ during tests 2016-08-26 12:32:17 +02:00
Alexander Larsson
fcd91ad6db Fix python tests in make distcheck 2016-08-25 14:21:22 +02:00
Alexander Larsson
42fae1c5d1 tests: Fix python2 use 2016-08-22 14:43:16 +02: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
e50ea6f66a More library tests
Test launching of apps and uninstallation
2016-08-02 10:56:33 -04:00
Matthias Clasen
149cff9c5d More library tests
More tests, for FlatpakRef.
2016-08-01 23:05:19 -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
Simon McVittie
6cc8062cfb libtest: replace dbus-launch with dbus-daemon
dbus-launch is X11-specific and contains a lot of legacy code to
support X11 autolaunching. It should not be part of the Wayland
(and/or Mir) future.

Start a dbus-daemon directly instead.
2016-08-01 11:29:50 +01:00
Alexander Larsson
c809ee4fa0 Fix test failures due to desktop validation 2016-07-30 23:52:56 +02:00
Alexander Larsson
0be93ed1dc extensions: Always create a tmpfs for subdirectory extensions.
This makes sure we can actually create a directory as needed, and not
having to have every subdirectory pre-created in the runtime.
2016-06-29 15:56:28 +02: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
Alexander Larsson
c6aa8376b1 tests/test-builder.sh: Re-silence flatpak-builder
The > /dev/null was accidentally dropped
2016-06-28 15:26:16 +02:00
Bastien Nocera
b9da048096 tests: Add test for "use-git" patch application 2016-06-28 15:23:44 +02:00
Alexander Larsson
9f047ff58e Merge pull request #154 from smcv/test-locale
test-basic: do not fail in non-English locales
2016-06-27 12:55:39 +02:00
Simon McVittie
a41ecc5254 test-basic: do not fail in non-English locales
One of the variations tested on Debian's reproducible build
infrastructure is that the second build is done in a French locale.
This test fails there, because it doesn't see "Usage:" in the help.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-26 16:56:42 +01: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
6f9915eade Run tests with a private XDG_RUNTIME_DIR
Otherwise, service activation will start a new xdg-document-portal
(because we're using a private DBUS_SESSION_BUS_ADDRESS), but because
XDG_RUNTIME_DIR is shared with the real system, it won't be able to
mount its filesystem.

We need to unmount the document portal before removing the private
XDG_RUNTIME_DIR.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-25 00:45:10 +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
Alexander Larsson
8740a9ded3 Add flatpak --supported-arches 2016-06-23 11:12:28 +02:00
Simon McVittie
ec81d5c61b test-run: avoid testing cases of filesystem binding that won't work
This test effectively assumed that ${test_builddir} is in /home, /opt,
a non-FHS top level directory, or some other directory that isn't
in dont_mount_in_root[] in flatpak-run.c. In a distro build where
${libexecdir} is below /usr, when running the installed-tests
so ${test_builddir} is ${libexecdir}, this assumption doesn't hold.

We can't just copy the file we're dealing with into a subdirectory
of /tmp or /var/tmp either, because those directories aren't
part of --filesystem=host. Meanwhile, we also don't want to pollute
$HOME with test detritus.

For the best possible coverage given all those constraints, we try
three directories: ${test_builddir}; ${TEST_DATA_DIR}, which is
in /var/tmp; and ~/.flatpak-tests, but only if it already exists.

When testing --[no]filesystem=host overrides, we don't even try
${TEST_DATA_DIR}, because we know it's in /var/tmp which can only
be shared explicitly, but we do try the others.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-16 00:10:42 -04: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
c800c59c54 test-builder: Test an empty module 2016-06-09 12:43:31 +02:00
Alexander Larsson
c81e43fa09 tests/test-builder: Test recursive modules 2016-06-09 12:10:52 +02:00
Alexander Larsson
e3e9c6559e tests: Test changing the subpaths on update 2016-06-07 22:12:51 +02:00
Alexander Larsson
20a737dc90 tests: Pull things via http instead of local pulls
This causes us to use the same codepaths as in real use.
Also, there seems to be an issue with partial pulls for local remotes.
2016-06-07 22:12:51 +02:00
Alexander Larsson
1bf2998352 Add tests for subpaths 2016-06-03 18:03:43 +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
Alexander Larsson
f4c2eeb057 Fix version test
The --version output changes slightly (was capitalized)
2016-05-31 15:16:24 +02:00