From 670ac47962a2696851d9d628d9827500d7c5f2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Wed, 20 Feb 2019 07:39:31 +0100 Subject: tests/integration/cachedfail.py: Fix test_push_cached_fail Ensure that a unique cache key is used for different test variants. This revealed that the test actually fails with --on-error=quit. Marking that test variant as expected failure until this is fixed. https://gitlab.com/BuildStream/buildstream/issues/534 --- tests/integration/cachedfail.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/cachedfail.py b/tests/integration/cachedfail.py index 5335ff5ed..ad91ea978 100644 --- a/tests/integration/cachedfail.py +++ b/tests/integration/cachedfail.py @@ -127,10 +127,11 @@ def test_build_depend_on_cached_fail(cli, tmpdir, datafiles): @pytest.mark.datafiles(DATA_DIR) @pytest.mark.parametrize("on_error", ("continue", "quit")) def test_push_cached_fail(cli, tmpdir, datafiles, on_error): + if on_error == 'quit': + pytest.xfail('https://gitlab.com/BuildStream/buildstream/issues/534') + project = os.path.join(datafiles.dirname, datafiles.basename) element_path = os.path.join(project, 'elements', 'element.bst') - workspace = os.path.join(cli.directory, 'workspace') - checkout = os.path.join(cli.directory, 'checkout') # Write out our test target element = { @@ -144,6 +145,8 @@ def test_push_cached_fail(cli, tmpdir, datafiles, on_error): 'config': { 'commands': [ 'false', + # Ensure unique cache key for different test variants + 'TEST="{}"'.format(os.environ.get('PYTEST_CURRENT_TEST')), ], }, } -- cgit v1.2.1