Commit Graph

142 Commits

Author SHA1 Message Date
Alexander Larsson
37d4047af2 tests: Don't leak SimpleHTTPServers 2017-03-27 14:10:50 +02:00
Alexander Larsson
9281a0afc9 test-webserver.sh: Remove accidental debug spew 2017-03-27 13:46:58 +02:00
Alexander Larsson
b3ddba3ab0 Add forgotten file 2017-03-27 12:46:24 +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
Alexander Larsson
54b8eef03c tests: Fix oci test 2017-03-14 11:53:43 +01:00
Alexander Larsson
576854fc7b tests: Make python mtime test modified file same size
This doesn't really affect the current test, but it makes
a difference for using python3 which also stores the size
in the cache.
2017-02-24 14:16:12 +01:00
Mathieu Bridon
b996a636ff builder: Add a "simple" buildsystem
This just runs the specified "build-commands" one after the other,
ignoring makefiles, configure scripts, and all the rest.

Relates to #134
2017-02-20 16:08:35 +01:00
Alexander Larsson
55e5ab272b tests: Fix python test regression from rofiles-fuse
We need to delete the old file when copying over it.
2017-02-16 09:52:14 +01:00
Alexander Larsson
7975dc489e tests: Remove some leftover debug spew 2017-01-30 14:33:43 +01:00
Alexander Larsson
b8c3b5aa44 Fix tests now that build-init requires the runtime to be installed 2017-01-27 13:56:04 +01: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
Simon McVittie
63daf2bb95 testlibrary: ensure that contents_array is NULL-terminated
Otherwise g_strjoinv() wanders off the end into uninitialized memory.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-01-18 08:41:03 +01:00
Alexander Larsson
c4f0f3245d Fix update of standalone bundle
We regressed on being able to install a bundle twice to update it.

This fixes https://github.com/flatpak/flatpak/issues/462
2017-01-16 11:51:14 +01:00
Alexander Larsson
d09f5ea072 tests: Add oci-over-http tests. 2017-01-12 00:08:00 +01:00
Alexander Larsson
0fb2f362a8 tests: Move the test repo to a subdirectory (repos/test)
This makes the ostree trivial-httpd --autoexit feature work better,
because it seems to exit whenever the root directory changes (i.e. not
only when its deleted).

This means the root dir can't be the repo (because then we can't
update the repo), or the base testdir (because we create files there
too), so instead we make the repo $testdir/repos/test and
$testdir/repos as the httpd root.
2017-01-12 00:04:36 +01:00
Alexander Larsson
f20e5f7823 bundles: Support dependencies and runtime-repo
If the bundle contains an origin link we can now install related
things from it, such as locale data.

You can also build the bundle with --runtime-repo=URL, where the url
points to a flatpakrepo file for a repo with runtimes. This works
similar to the RuntimeRepo= feature in flatpakref files.
2016-12-20 16:27:57 +01:00
Mario Sanchez Prada
54d65aabc5 Fix CI build with clang: remove unused variable 2016-12-20 16:26:20 +01:00
Mario Sanchez Prada
29510ff4e0 Add unit tests to check the new feature to support multiple installations
Test all the new public APIs, making sure that the list of system-wide
installations is returned in the right order according to their priorities.
2016-12-20 09:54:39 +01:00
Alexander Larsson
5ef7e9d582 flatpak.supp: Suppress weird libsoup leak 2016-12-19 14:19:41 +01:00
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