File: missing-command.py

package info (click to toggle)
buildstream 1.6.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,412 kB
  • sloc: python: 27,865; sh: 1,339; makefile: 137; ansic: 48
file content (19 lines) | stat: -rw-r--r-- 498 bytes parent folder | download | duplicates (5)
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')