summaryrefslogtreecommitdiff
path: root/tests/sandboxes/missing-command.py
blob: 8f210bceccdb095f58fc5b527693feb5ad53d170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
import pytest

from buildstream._exceptions import ErrorDomain

from tests.testutils import cli


DATA_DIR = os.path.join(
    os.path.dirname(os.path.realpath(__file__)),
    "missing-command"
)


@pytest.mark.datafiles(DATA_DIR)
def test_missing_command(cli, tmpdir, datafiles):
    project = os.path.join(datafiles.dirname, datafiles.basename)
    result = cli.run(project=project, args=['build', 'no-runtime.bst'])
    result.assert_task_error(ErrorDomain.SANDBOX, 'missing-command')