Commit Graph

159 Commits

Author SHA1 Message Date
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
dac242fb49 Remove unused variables 2017-05-22 13:40:11 +02:00
Alexander Larsson
6ce8521b64 document-portal: Add AddFull() operation
This allows you to add multiple paths at the same time, plus
grant an app access to it, plus it returns the fuse mount path.

This allows you to avoid a lot of roundtrip in common cases.
2017-05-19 17:01:46 +02:00
Alexander Larsson
c35bce077f remote-add: Use the new system-helper for initial metadata update
This removes some duplicated code, and also follows the new
redirect-url property on initial add.

This also means we're requiring gpg signatures to be correct
on remote-add, so fix up the tests
2017-05-11 11:20:39 +02:00
Alexander Larsson
2f533f3a68 tests: run test-repo.sh with system repo too 2017-05-10 11:54:27 +02:00
Alexander Larsson
755d4b6337 tests: Add tests for --redirect-url and new GPG key 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
ec89340a26 tests: Add a second gpg keyring 2017-05-10 11:54:27 +02:00
Alexander Larsson
b33d6fd04f tests: Allow overriding GPG args 2017-05-10 11:54:27 +02:00
Alexander Larsson
99a6200cab tests: Make it possible to create multiple test repos 2017-05-10 11:54:27 +02:00
Alexander Larsson
0d4fa486b5 Fix tests by setting XDG_CACHE_HOME
We use this now, so need to have it set to the test homedir
2017-05-09 13:24:54 +02:00
Colin Walters
48b5dd5e7b tests: Fix race condition in tmp webserver
I was seeing this when trying to run flatpak's tests in ostree's CI:
https://github.com/ostreedev/ostree/pull/824

The race here is that the python process can still be writing to the output
while sed is reading it, and hence we'll find a difference on the next line.
Fix this by making a tmp copy of the file, which then both sed and cmp will
read consistently.

I'm not *entirely* sure this will fix the problem as I couldn't easily reproduce
the race locally, but I believe it at least fixes *a* race.
2017-05-08 11:27:09 +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
Matthias Clasen
564490c07e Fix the testsuite
Some tests were using flatpak info --runtime, which no
longer exists. Removing the option doesn't do any harm,
and the test passes again.
2017-04-18 12:34:19 +02:00
Alexander Larsson
3ff6d312de update: Only allow downgrades if a commit is explicitly specified
If you run "flatpak update" then we will never update to
a commit that is older than the currently installed one. This
protects against a man-in-the-middle attack that would otherwise
let the attacker downgrade to a previously signed version that
may have some vulnerability.
2017-04-03 09:45:45 +02:00
Alexander Larsson
da4ea44e41 OCI: Use gpg signatures in tests-oci.sh 2017-03-29 18:04:54 +02:00
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