summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbderrahim Kitouni <akitouni@gnome.org>2020-06-23 13:10:38 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2020-07-29 13:23:50 +0000
commite906d7635873f678acef40955a61a6e9008daf8b (patch)
tree89a3318ae723f73b7aab342def4f1176319a9aab
parentb4aaf3576a31abb8bc77a812da760383f2bf8ec4 (diff)
downloadbuildstream-e906d7635873f678acef40955a61a6e9008daf8b.tar.gz
tests/integration/interactive_build.py: make a new test for retrying failed buildsabderrahim/cached-failure
The old one tested that retrying the failed build doesn't actually retry
-rw-r--r--tests/integration/interactive_build.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/integration/interactive_build.py b/tests/integration/interactive_build.py
index c0b087126..285cb86f8 100644
--- a/tests/integration/interactive_build.py
+++ b/tests/integration/interactive_build.py
@@ -42,7 +42,7 @@ def build_session(datafiles, element_name):
@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox")
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.parametrize("element_name", ["interactive/failed-build.bst"])
-@pytest.mark.parametrize("choice", ["continue", "quit", "terminate", "retry"])
+@pytest.mark.parametrize("choice", ["continue", "quit", "terminate"])
def test_failed_build_quit(element_name, build_session, choice):
build_session.expect_exact("Choice: [continue]:", timeout=PEXPECT_TIMEOUT_LONG)
build_session.sendline(choice)
@@ -55,6 +55,21 @@ def test_failed_build_quit(element_name, build_session, choice):
@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox")
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.parametrize("element_name", ["interactive/failed-build.bst"])
+def test_failed_build_retry(element_name, build_session):
+ build_session.expect_exact("Choice: [continue]:", timeout=PEXPECT_TIMEOUT_LONG)
+ build_session.sendline("retry")
+
+ build_session.expect_exact("Choice: [continue]:", timeout=PEXPECT_TIMEOUT_LONG)
+ build_session.sendline("quit")
+
+ build_session.expect_exact(pexpect.EOF)
+ build_session.close()
+ assert build_session.exitstatus == 255
+
+
+@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox")
+@pytest.mark.datafiles(DATA_DIR)
+@pytest.mark.parametrize("element_name", ["interactive/failed-build.bst"])
def test_failed_build_log(element_name, build_session):
build_session.expect_exact("Choice: [continue]:", timeout=PEXPECT_TIMEOUT_LONG)
build_session.sendline("log")