summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2018-11-14 12:22:03 +0000
committerJavier Jardón <jjardon@gnome.org>2018-11-14 12:22:03 +0000
commit264a57f6c0f232b957a3953ca336fe3976037097 (patch)
tree40c3d9835d1e96771f19d87980db85efecce585e
parente55a9703f9567953ee5675da4725940c08ec90eb (diff)
parentc5d72ae789ddc7669bfea6abdd47ea2e00b90984 (diff)
downloadbuildstream-264a57f6c0f232b957a3953ca336fe3976037097.tar.gz
Merge branch 'valentindavid/integration-tests-aarch64' into 'master'
Run tests on aarch64 Closes #369 and #755 See merge request BuildStream/buildstream!948
-rw-r--r--.gitlab-ci.yml28
-rw-r--r--tests/cachekey/cachekey.py4
-rw-r--r--tests/examples/autotools.py6
-rw-r--r--tests/examples/developing.py8
-rw-r--r--tests/examples/flatpak-autotools.py6
-rw-r--r--tests/examples/integration-commands.py6
-rw-r--r--tests/examples/junctions.py6
-rw-r--r--tests/examples/running-commands.py6
-rw-r--r--tests/format/list-directive-type-error/project.conf2
-rw-r--r--tests/integration/project/elements/base/base-alpine.bst9
-rw-r--r--tests/integration/project/project.conf6
-rw-r--r--tests/testutils/site.py2
12 files changed, 72 insertions, 17 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 35a960b31..e5aeb495a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -79,32 +79,46 @@ source_dist:
- cd ../..
- mkdir -p coverage-linux/
- cp dist/buildstream/.coverage coverage-linux/coverage."${CI_JOB_NAME}"
- except:
- - schedules
artifacts:
paths:
- coverage-linux/
tests-debian-9:
- image: buildstream/testsuite-debian:9-master-119-552f5fc6
+ image: buildstream/testsuite-debian:9-master-123-7ce6581b
<<: *linux-tests
+ except:
+ - schedules
tests-fedora-27:
- image: buildstream/testsuite-fedora:27-master-119-552f5fc6
+ image: buildstream/testsuite-fedora:27-master-123-7ce6581b
<<: *linux-tests
+ except:
+ - schedules
tests-fedora-28:
- image: buildstream/testsuite-fedora:28-master-119-552f5fc6
+ image: buildstream/testsuite-fedora:28-master-123-7ce6581b
<<: *linux-tests
+ except:
+ - schedules
tests-ubuntu-18.04:
- image: buildstream/testsuite-ubuntu:18.04-master-119-552f5fc6
+ image: buildstream/testsuite-ubuntu:18.04-master-123-7ce6581b
<<: *linux-tests
+ except:
+ - schedules
+
+overnight-fedora-28-aarch64:
+ image: buildstream/testsuite-fedora:aarch64-28-master-123-7ce6581b
+ tags:
+ - aarch64
+ <<: *linux-tests
+ only:
+ - schedules
tests-unix:
# Use fedora here, to a) run a test on fedora and b) ensure that we
# can get rid of ostree - this is not possible with debian-8
- image: buildstream/testsuite-fedora:27-master-119-552f5fc6
+ image: buildstream/testsuite-fedora:27-master-123-7ce6581b
stage: test
variables:
BST_FORCE_BACKEND: "unix"
diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py
index b1f8a9140..113f5bab0 100644
--- a/tests/cachekey/cachekey.py
+++ b/tests/cachekey/cachekey.py
@@ -36,7 +36,7 @@
# the result.
#
from tests.testutils.runcli import cli
-from tests.testutils.site import HAVE_BZR, HAVE_GIT, HAVE_OSTREE, IS_LINUX
+from tests.testutils.site import HAVE_BZR, HAVE_GIT, HAVE_OSTREE, IS_LINUX, MACHINE_ARCH
from buildstream.plugin import CoreWarnings
from buildstream import _yaml
import os
@@ -144,6 +144,8 @@ DATA_DIR = os.path.join(
# The cache key test uses a project which exercises all plugins,
# so we cant run it at all if we dont have them installed.
#
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Cache keys depend on architecture')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.skipif(HAVE_BZR is False, reason="bzr is not available")
@pytest.mark.skipif(HAVE_GIT is False, reason="git is not available")
diff --git a/tests/examples/autotools.py b/tests/examples/autotools.py
index 37f6ed0e3..fc6ff7e09 100644
--- a/tests/examples/autotools.py
+++ b/tests/examples/autotools.py
@@ -3,7 +3,7 @@ import pytest
from tests.testutils import cli_integration as cli
from tests.testutils.integration import assert_contains
-from tests.testutils.site import IS_LINUX
+from tests.testutils.site import IS_LINUX, MACHINE_ARCH
pytestmark = pytest.mark.integration
@@ -13,6 +13,8 @@ DATA_DIR = os.path.join(
# Tests a build of the autotools amhello project on a alpine-linux base runtime
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_autotools_build(cli, tmpdir, datafiles):
@@ -36,6 +38,8 @@ def test_autotools_build(cli, tmpdir, datafiles):
# Test running an executable built with autotools.
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_autotools_run(cli, tmpdir, datafiles):
diff --git a/tests/examples/developing.py b/tests/examples/developing.py
index bca6ac61d..6c65c5e54 100644
--- a/tests/examples/developing.py
+++ b/tests/examples/developing.py
@@ -4,7 +4,7 @@ import pytest
import tests.testutils.patch as patch
from tests.testutils import cli_integration as cli
from tests.testutils.integration import assert_contains
-from tests.testutils.site import IS_LINUX
+from tests.testutils.site import IS_LINUX, MACHINE_ARCH
pytestmark = pytest.mark.integration
@@ -14,6 +14,8 @@ DATA_DIR = os.path.join(
# Test that the project builds successfully
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_autotools_build(cli, tmpdir, datafiles):
@@ -35,6 +37,8 @@ def test_autotools_build(cli, tmpdir, datafiles):
# Test the unmodified hello command works as expected.
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_run_unmodified_hello(cli, tmpdir, datafiles):
@@ -66,6 +70,8 @@ def test_open_workspace(cli, tmpdir, datafiles):
# Test making a change using the workspace
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_make_change_in_workspace(cli, tmpdir, datafiles):
diff --git a/tests/examples/flatpak-autotools.py b/tests/examples/flatpak-autotools.py
index 2d02755fc..32a0dc193 100644
--- a/tests/examples/flatpak-autotools.py
+++ b/tests/examples/flatpak-autotools.py
@@ -3,7 +3,7 @@ import pytest
from tests.testutils import cli_integration as cli
from tests.testutils.integration import assert_contains
-from tests.testutils.site import IS_LINUX
+from tests.testutils.site import IS_LINUX, MACHINE_ARCH
pytestmark = pytest.mark.integration
@@ -32,6 +32,8 @@ 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 writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_autotools_build(cli, tmpdir, datafiles):
@@ -55,6 +57,8 @@ def test_autotools_build(cli, tmpdir, datafiles):
# Test running an executable built with autotools
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_autotools_run(cli, tmpdir, datafiles):
diff --git a/tests/examples/integration-commands.py b/tests/examples/integration-commands.py
index 32ef763eb..19c5df2ef 100644
--- a/tests/examples/integration-commands.py
+++ b/tests/examples/integration-commands.py
@@ -3,7 +3,7 @@ import pytest
from tests.testutils import cli_integration as cli
from tests.testutils.integration import assert_contains
-from tests.testutils.site import IS_LINUX
+from tests.testutils.site import IS_LINUX, MACHINE_ARCH
pytestmark = pytest.mark.integration
@@ -12,6 +12,8 @@ DATA_DIR = os.path.join(
)
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_integration_commands_build(cli, tmpdir, datafiles):
@@ -23,6 +25,8 @@ def test_integration_commands_build(cli, tmpdir, datafiles):
# Test running the executable
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_integration_commands_run(cli, tmpdir, datafiles):
diff --git a/tests/examples/junctions.py b/tests/examples/junctions.py
index d2a653884..9ddb7b7fb 100644
--- a/tests/examples/junctions.py
+++ b/tests/examples/junctions.py
@@ -3,7 +3,7 @@ import pytest
from tests.testutils import cli_integration as cli
from tests.testutils.integration import assert_contains
-from tests.testutils.site import IS_LINUX
+from tests.testutils.site import IS_LINUX, MACHINE_ARCH
pytestmark = pytest.mark.integration
@@ -13,6 +13,8 @@ DATA_DIR = os.path.join(
# Test that the project builds successfully
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_build(cli, tmpdir, datafiles):
@@ -23,6 +25,8 @@ def test_build(cli, tmpdir, datafiles):
# Test the callHello script works as expected.
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_shell_call_hello(cli, tmpdir, datafiles):
diff --git a/tests/examples/running-commands.py b/tests/examples/running-commands.py
index 95f645d77..26b53f7ad 100644
--- a/tests/examples/running-commands.py
+++ b/tests/examples/running-commands.py
@@ -3,7 +3,7 @@ import pytest
from tests.testutils import cli_integration as cli
from tests.testutils.integration import assert_contains
-from tests.testutils.site import IS_LINUX
+from tests.testutils.site import IS_LINUX, MACHINE_ARCH
pytestmark = pytest.mark.integration
@@ -12,6 +12,8 @@ DATA_DIR = os.path.join(
)
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_running_commands_build(cli, tmpdir, datafiles):
@@ -23,6 +25,8 @@ def test_running_commands_build(cli, tmpdir, datafiles):
# Test running the executable
+@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
+ reason='Examples are writtent for x86_64')
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_running_commands_run(cli, tmpdir, datafiles):
diff --git a/tests/format/list-directive-type-error/project.conf b/tests/format/list-directive-type-error/project.conf
index dde56d7b8..1dd0f1b0a 100644
--- a/tests/format/list-directive-type-error/project.conf
+++ b/tests/format/list-directive-type-error/project.conf
@@ -4,4 +4,4 @@ options:
arch:
type: arch
description: Example architecture option
- values: [ x86_32, x86_64 ]
+ values: [ x86_32, x86_64, aarch64 ]
diff --git a/tests/integration/project/elements/base/base-alpine.bst b/tests/integration/project/elements/base/base-alpine.bst
index 687588f7c..dd5ee7d88 100644
--- a/tests/integration/project/elements/base/base-alpine.bst
+++ b/tests/integration/project/elements/base/base-alpine.bst
@@ -7,6 +7,11 @@ description: |
sources:
- kind: tar
- url: alpine:integration-tests-base.v1.x86_64.tar.xz
base-dir: ''
- ref: 3eb559250ba82b64a68d86d0636a6b127aa5f6d25d3601a79f79214dc9703639
+ (?):
+ - arch == "x86_64":
+ ref: 3eb559250ba82b64a68d86d0636a6b127aa5f6d25d3601a79f79214dc9703639
+ url: "alpine:integration-tests-base.v1.x86_64.tar.xz"
+ - arch == "aarch64":
+ ref: 431fb5362032ede6f172e70a3258354a8fd71fcbdeb1edebc0e20968c792329a
+ url: "alpine:integration-tests-base.v1.aarch64.tar.xz"
diff --git a/tests/integration/project/project.conf b/tests/integration/project/project.conf
index 3bf128543..e0475539a 100644
--- a/tests/integration/project/project.conf
+++ b/tests/integration/project/project.conf
@@ -9,6 +9,12 @@ options:
type: bool
description: Whether to expect a linux platform
default: True
+ arch:
+ type: arch
+ description: Current architecture
+ values:
+ - x86_64
+ - aarch64
split-rules:
test:
- |
diff --git a/tests/testutils/site.py b/tests/testutils/site.py
index 7dc01a613..6801be471 100644
--- a/tests/testutils/site.py
+++ b/tests/testutils/site.py
@@ -49,3 +49,5 @@ except ImportError:
HAVE_ARPY = False
IS_LINUX = os.getenv('BST_FORCE_BACKEND', sys.platform).startswith('linux')
+
+_, _, _, _, MACHINE_ARCH = os.uname()