Commit Graph

11 Commits

Author SHA1 Message Date
Simon McVittie
03b8836e6b libtest-core: Mention bubblewrap as a user of this file
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-18 10:13:14 +01:00
Simon McVittie
2e1184288c libtest-core: Update URL of rpm-ostree
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-18 10:12:57 +01:00
Simon McVittie
3973fe665c libtest-core: Add SPDX-License-Identifier
This realigns the header with the canonical copy in libostree.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-18 10:12:39 +01:00
Simon McVittie
338ddc0eb4 libtest-core: Separate out bubblewrap-specific parts
extract_child_pid is specific to bubblewrap and wouldn't be useful to
share with the canonical copy of libtest-core in libostree.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-18 10:11:56 +01:00
Matthew Leeds
e2e61475a1 libtest-core: Add assert_file_has_content_once
[Originally part of d2118165 "tests: Check that example symbol isn't
released" in libostree]
2021-06-18 10:02:39 +01:00
Jonathan Lebon
84abc17c53 tests/libtest-core: support multiple literal checks
`grep` supports checking multiple fixed strings separated by newlines,
but it's mostly just easier to pass them as separate arguments, so let's
support that. This is now at parity with the similar
`assert_file_has_content`.
2021-06-18 10:01:42 +01:00
Simon McVittie
08f4146b85 libtest-core: Improve C.UTF-8 locale detection
Originally several libostree commits by Philip Withnall, Jan Tojnar,
Alex Kiernan and Dan Nicholson:

* e48a1bcf "tests: Fix LC_ALL for systems which use .utf8 suffixes"
* f200efdb "tests: Fix locale detection"
* 4d17cd91 "tests/core: Fallback to en_US.UTF-8 locale"
* 3d48021f "tests/core: Assume C.UTF-8 if locale isn't found"
* 5135a1e5 "tests/core: Really pick C.UTF-8 locale"
2021-06-18 09:58:07 +01:00
Simon McVittie
7cf7c33cd2 libtest-core: On failure, make it clearer what has happened
If we fail as a result of `set -x`, It's often not completely obvious
which command failed or how. Use a trap on ERR to show the command that
failed, and its exit status.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-04-18 12:45:35 +01:00
Alexander Larsson
3e5fe1bfba tests: Better error message if assert_files_equal fails 2019-11-26 09:28:51 +01:00
Alexander Larsson
c5c999a750 tests: test --userns 2019-11-22 11:17:39 +01:00
Colin Walters
e745b94997 tests: Import libtest-core.sh from ostree
This was factored out to be sharable with other projects, let's do so.

Closes: #203
Approved by: jlebon
2017-08-02 20:00:08 +00:00