summaryrefslogtreecommitdiff
path: root/tests/frontend/workspace.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/frontend/workspace.py')
-rw-r--r--tests/frontend/workspace.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index ad0fc7371..037a1a970 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -1333,3 +1333,35 @@ def test_build_all(cli, tmpdir, datafiles, case, strict, non_workspaced_elements
# Assert that the target is built
assert cli.get_element_states(project, all_elements) == \
{elem: "cached" for elem in all_elements}
+
+
+@pytest.mark.datafiles(DATA_DIR)
+@pytest.mark.parametrize('strict', ['strict', 'non-strict'])
+def test_show_workspace_logs(cli, tmpdir, datafiles, strict):
+ project = str(datafiles)
+ workspace = os.path.join(str(tmpdir), 'workspace')
+ target = 'manual.bst'
+
+ # Configure strict mode
+ strict_mode = True
+ if strict != 'strict':
+ strict_mode = False
+ cli.configure({
+ 'projects': {
+ 'test': {
+ 'strict': strict_mode
+ }
+ }
+ })
+
+ # First open the workspace
+ result = cli.run(project=project, args=['workspace', 'open', '--directory', workspace, target])
+ result.assert_success()
+
+ # Build the element
+ result = cli.run(project=project, args=['build', target])
+ result.assert_task_error(ErrorDomain.SANDBOX, 'missing-command')
+
+ result = cli.run(project=project, args=['artifact', 'log', target])
+ result.assert_success()
+ assert result.output == ""