summaryrefslogtreecommitdiff
path: root/tests/examples/flatpak-autotools.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examples/flatpak-autotools.py')
-rw-r--r--tests/examples/flatpak-autotools.py36
1 files changed, 8 insertions, 28 deletions
diff --git a/tests/examples/flatpak-autotools.py b/tests/examples/flatpak-autotools.py
index 4e7a9e36f..9e9ee8827 100644
--- a/tests/examples/flatpak-autotools.py
+++ b/tests/examples/flatpak-autotools.py
@@ -13,19 +13,12 @@ pytestmark = pytest.mark.integration
DATA_DIR = os.path.join(
- os.path.dirname(os.path.realpath(__file__)),
- "..",
- "..",
- "doc",
- "examples",
- "flatpak-autotools",
+ os.path.dirname(os.path.realpath(__file__)), "..", "..", "doc", "examples", "flatpak-autotools",
)
try:
- from bst_plugins_experimental.sources import (
- _ostree,
- ) # pylint: disable=unused-import
+ from bst_plugins_experimental.sources import _ostree # pylint: disable=unused-import
# Even when we have the plugin, it might be missing dependencies. This requires
# bst_plugins_experimantal to be fully installed, with host ostree dependencies
@@ -41,15 +34,9 @@ except (ImportError, ValueError):
def workaround_setuptools_bug(project):
os.makedirs(os.path.join(project, "files", "links"), exist_ok=True)
try:
- os.symlink(
- os.path.join("usr", "lib"), os.path.join(project, "files", "links", "lib")
- )
- os.symlink(
- os.path.join("usr", "bin"), os.path.join(project, "files", "links", "bin")
- )
- os.symlink(
- os.path.join("usr", "etc"), os.path.join(project, "files", "links", "etc")
- )
+ os.symlink(os.path.join("usr", "lib"), os.path.join(project, "files", "links", "lib"))
+ os.symlink(os.path.join("usr", "bin"), os.path.join(project, "files", "links", "bin"))
+ os.symlink(os.path.join("usr", "etc"), os.path.join(project, "files", "links", "etc"))
except FileExistsError:
# If the files exist, we're running from a git checkout and
# not a source distribution, no need to complain
@@ -59,9 +46,7 @@ def workaround_setuptools_bug(project):
# Test that a build upon flatpak runtime 'works' - we use the autotools sample
# amhello project for this.
@pytest.mark.skipif(MACHINE_ARCH != "x86-64", reason="Examples are written for x86-64")
-@pytest.mark.skipif(
- not IS_LINUX or not HAVE_OSTREE_PLUGIN, reason="Only available on linux with ostree"
-)
+@pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE_PLUGIN, reason="Only available on linux with ostree")
@pytest.mark.datafiles(DATA_DIR)
def test_autotools_build(cli, datafiles):
project = str(datafiles)
@@ -71,10 +56,7 @@ def test_autotools_build(cli, datafiles):
result = cli.run(project=project, args=["build", "hello.bst"])
assert result.exit_code == 0
- result = cli.run(
- project=project,
- args=["artifact", "checkout", "hello.bst", "--directory", checkout],
- )
+ result = cli.run(project=project, args=["artifact", "checkout", "hello.bst", "--directory", checkout],)
assert result.exit_code == 0
assert_contains(
@@ -94,9 +76,7 @@ def test_autotools_build(cli, datafiles):
# Test running an executable built with autotools
@pytest.mark.skipif(MACHINE_ARCH != "x86-64", reason="Examples are written for x86-64")
-@pytest.mark.skipif(
- not IS_LINUX or not HAVE_OSTREE_PLUGIN, reason="Only available on linux with ostree"
-)
+@pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE_PLUGIN, reason="Only available on linux with ostree")
@pytest.mark.datafiles(DATA_DIR)
def test_autotools_run(cli, datafiles):
project = str(datafiles)