blob: 1824ff0be6a0a69fc4700aa1c70e5c38625b7262 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import os
import pytest
from buildstream import _yaml
from buildstream._exceptions import LoadError, LoadErrorReason
from tests.testutils.runcli import cli
# Project directory
DATA_DIR = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
"project-overrides"
)
@pytest.mark.datafiles(DATA_DIR)
def test_prepend_configure_commands(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename, 'prepend-configure-commands')
result = cli.run(project=project, silent=True, args=[
'show',
'--deps', 'none',
'--format', '%{config}',
'element.bst'])
assert result.exit_code == 0
loaded = _yaml.load_data(result.output)
config_commands = loaded['configure-commands']
assert len(config_commands) == 3
assert config_commands[0] == 'echo "Hello World!"'
|