Commit 264a57f6 authored by Javier Jardón's avatar Javier Jardón

Merge branch 'valentindavid/integration-tests-aarch64' into 'master'

Run tests on aarch64

Closes #369 and #755

See merge request !948
parents e55a9703 c5d72ae7
Pipeline #36566937 passed with stages
in 27 minutes and 6 seconds
......@@ -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"
......
......@@ -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")
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -4,4 +4,4 @@ options:
arch:
type: arch
description: Example architecture option
values: [ x86_32, x86_64 ]
values: [ x86_32, x86_64, aarch64 ]
......@@ -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"
......@@ -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:
- |
......
......@@ -49,3 +49,5 @@ except ImportError:
HAVE_ARPY = False
IS_LINUX = os.getenv('BST_FORCE_BACKEND', sys.platform).startswith('linux')
_, _, _, _, MACHINE_ARCH = os.uname()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment