Valentin David pushed to branch valentindavid/integration-tests-aarch64 at BuildStream / buildstream
Commits:
- 
d0932ea3
by Valentin David at 2018-11-12T14:47:06Z
- 
9390a8c2
by Valentin David at 2018-11-12T14:47:06Z
7 changed files:
- tests/cachekey/cachekey.py
- tests/examples/autotools.py
- tests/examples/developing.py
- tests/examples/flatpak-autotools.py
- tests/examples/integration-commands.py
- tests/examples/junctions.py
- tests/testutils/site.py
Changes:
| ... | ... | @@ -36,7 +36,7 @@ | 
| 36 | 36 |  # the result.
 | 
| 37 | 37 |  #
 | 
| 38 | 38 |  from tests.testutils.runcli import cli
 | 
| 39 | -from tests.testutils.site import HAVE_BZR, HAVE_GIT, HAVE_OSTREE, IS_LINUX
 | |
| 39 | +from tests.testutils.site import HAVE_BZR, HAVE_GIT, HAVE_OSTREE, IS_LINUX, MACHINE_ARCH
 | |
| 40 | 40 |  from buildstream.plugin import CoreWarnings
 | 
| 41 | 41 |  from buildstream import _yaml
 | 
| 42 | 42 |  import os
 | 
| ... | ... | @@ -144,6 +144,8 @@ DATA_DIR = os.path.join( | 
| 144 | 144 |  # The cache key test uses a project which exercises all plugins,
 | 
| 145 | 145 |  # so we cant run it at all if we dont have them installed.
 | 
| 146 | 146 |  #
 | 
| 147 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 148 | +                    reason='Cache keys depend on architecture')
 | |
| 147 | 149 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 148 | 150 |  @pytest.mark.skipif(HAVE_BZR is False, reason="bzr is not available")
 | 
| 149 | 151 |  @pytest.mark.skipif(HAVE_GIT is False, reason="git is not available")
 | 
| ... | ... | @@ -3,7 +3,7 @@ import pytest | 
| 3 | 3 |  | 
| 4 | 4 |  from tests.testutils import cli_integration as cli
 | 
| 5 | 5 |  from tests.testutils.integration import assert_contains
 | 
| 6 | -from tests.testutils.site import IS_LINUX
 | |
| 6 | +from tests.testutils.site import IS_LINUX, MACHINE_ARCH
 | |
| 7 | 7 |  | 
| 8 | 8 |  pytestmark = pytest.mark.integration
 | 
| 9 | 9 |  | 
| ... | ... | @@ -13,6 +13,8 @@ DATA_DIR = os.path.join( | 
| 13 | 13 |  | 
| 14 | 14 |  | 
| 15 | 15 |  # Tests a build of the autotools amhello project on a alpine-linux base runtime
 | 
| 16 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 17 | +                    reason='Examples are writtent for x86_64')
 | |
| 16 | 18 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 17 | 19 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 18 | 20 |  def test_autotools_build(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -36,6 +38,8 @@ def test_autotools_build(cli, tmpdir, datafiles): | 
| 36 | 38 |  | 
| 37 | 39 |  | 
| 38 | 40 |  # Test running an executable built with autotools.
 | 
| 41 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 42 | +                    reason='Examples are writtent for x86_64')
 | |
| 39 | 43 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 40 | 44 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 41 | 45 |  def test_autotools_run(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -4,7 +4,7 @@ import pytest | 
| 4 | 4 |  import tests.testutils.patch as patch
 | 
| 5 | 5 |  from tests.testutils import cli_integration as cli
 | 
| 6 | 6 |  from tests.testutils.integration import assert_contains
 | 
| 7 | -from tests.testutils.site import IS_LINUX
 | |
| 7 | +from tests.testutils.site import IS_LINUX, MACHINE_ARCH
 | |
| 8 | 8 |  | 
| 9 | 9 |  pytestmark = pytest.mark.integration
 | 
| 10 | 10 |  | 
| ... | ... | @@ -14,6 +14,8 @@ DATA_DIR = os.path.join( | 
| 14 | 14 |  | 
| 15 | 15 |  | 
| 16 | 16 |  # Test that the project builds successfully
 | 
| 17 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 18 | +                    reason='Examples are writtent for x86_64')
 | |
| 17 | 19 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 18 | 20 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 19 | 21 |  def test_autotools_build(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -35,6 +37,8 @@ def test_autotools_build(cli, tmpdir, datafiles): | 
| 35 | 37 |  | 
| 36 | 38 |  | 
| 37 | 39 |  # Test the unmodified hello command works as expected.
 | 
| 40 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 41 | +                    reason='Examples are writtent for x86_64')
 | |
| 38 | 42 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 39 | 43 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 40 | 44 |  def test_run_unmodified_hello(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -66,6 +70,8 @@ def test_open_workspace(cli, tmpdir, datafiles): | 
| 66 | 70 |  | 
| 67 | 71 |  | 
| 68 | 72 |  # Test making a change using the workspace
 | 
| 73 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 74 | +                    reason='Examples are writtent for x86_64')
 | |
| 69 | 75 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 70 | 76 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 71 | 77 |  def test_make_change_in_workspace(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -3,7 +3,7 @@ import pytest | 
| 3 | 3 |  | 
| 4 | 4 |  from tests.testutils import cli_integration as cli
 | 
| 5 | 5 |  from tests.testutils.integration import assert_contains
 | 
| 6 | -from tests.testutils.site import IS_LINUX
 | |
| 6 | +from tests.testutils.site import IS_LINUX, MACHINE_ARCH
 | |
| 7 | 7 |  | 
| 8 | 8 |  | 
| 9 | 9 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -32,6 +32,8 @@ def workaround_setuptools_bug(project): | 
| 32 | 32 |  | 
| 33 | 33 |  # Test that a build upon flatpak runtime 'works' - we use the autotools sample
 | 
| 34 | 34 |  # amhello project for this.
 | 
| 35 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 36 | +                    reason='Examples are writtent for x86_64')
 | |
| 35 | 37 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 36 | 38 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 37 | 39 |  def test_autotools_build(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -55,6 +57,8 @@ def test_autotools_build(cli, tmpdir, datafiles): | 
| 55 | 57 |  | 
| 56 | 58 |  | 
| 57 | 59 |  # Test running an executable built with autotools
 | 
| 60 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 61 | +                    reason='Examples are writtent for x86_64')
 | |
| 58 | 62 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 59 | 63 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 60 | 64 |  def test_autotools_run(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -3,7 +3,7 @@ import pytest | 
| 3 | 3 |  | 
| 4 | 4 |  from tests.testutils import cli_integration as cli
 | 
| 5 | 5 |  from tests.testutils.integration import assert_contains
 | 
| 6 | -from tests.testutils.site import IS_LINUX
 | |
| 6 | +from tests.testutils.site import IS_LINUX, MACHINE_ARCH
 | |
| 7 | 7 |  | 
| 8 | 8 |  | 
| 9 | 9 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -12,6 +12,8 @@ DATA_DIR = os.path.join( | 
| 12 | 12 |  )
 | 
| 13 | 13 |  | 
| 14 | 14 |  | 
| 15 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 16 | +                    reason='Examples are writtent for x86_64')
 | |
| 15 | 17 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 16 | 18 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 17 | 19 |  def test_integration_commands_build(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -23,6 +25,8 @@ def test_integration_commands_build(cli, tmpdir, datafiles): | 
| 23 | 25 |  | 
| 24 | 26 |  | 
| 25 | 27 |  # Test running the executable
 | 
| 28 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 29 | +                    reason='Examples are writtent for x86_64')
 | |
| 26 | 30 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 27 | 31 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 28 | 32 |  def test_integration_commands_run(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -3,7 +3,7 @@ import pytest | 
| 3 | 3 |  | 
| 4 | 4 |  from tests.testutils import cli_integration as cli
 | 
| 5 | 5 |  from tests.testutils.integration import assert_contains
 | 
| 6 | -from tests.testutils.site import IS_LINUX
 | |
| 6 | +from tests.testutils.site import IS_LINUX, MACHINE_ARCH
 | |
| 7 | 7 |  | 
| 8 | 8 |  pytestmark = pytest.mark.integration
 | 
| 9 | 9 |  | 
| ... | ... | @@ -13,6 +13,8 @@ DATA_DIR = os.path.join( | 
| 13 | 13 |  | 
| 14 | 14 |  | 
| 15 | 15 |  # Test that the project builds successfully
 | 
| 16 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 17 | +                    reason='Examples are writtent for x86_64')
 | |
| 16 | 18 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 17 | 19 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 18 | 20 |  def test_build(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -23,6 +25,8 @@ def test_build(cli, tmpdir, datafiles): | 
| 23 | 25 |  | 
| 24 | 26 |  | 
| 25 | 27 |  # Test the callHello script works as expected.
 | 
| 28 | +@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
 | |
| 29 | +                    reason='Examples are writtent for x86_64')
 | |
| 26 | 30 |  @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
 | 
| 27 | 31 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 28 | 32 |  def test_shell_call_hello(cli, tmpdir, datafiles):
 | 
| ... | ... | @@ -49,3 +49,5 @@ except ImportError: | 
| 49 | 49 |      HAVE_ARPY = False
 | 
| 50 | 50 |  | 
| 51 | 51 |  IS_LINUX = os.getenv('BST_FORCE_BACKEND', sys.platform).startswith('linux')
 | 
| 52 | + | |
| 53 | +_, _, _, _, MACHINE_ARCH = os.uname() | 
