File: quilt.py

package info (click to toggle)
bst-external 0.29.0-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 664 kB
  • sloc: python: 3,936; makefile: 53
file content (23 lines) | stat: -rw-r--r-- 695 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import pytest

from tests.testutils import cli_integration as cli
from tests.testutils.integration import assert_contains

DATA_DIR = os.path.join(
    os.path.dirname(os.path.realpath(__file__)),
    "project"
)

@pytest.mark.datafiles(DATA_DIR)
def test_quilt_build(cli, datafiles):
    project = str(datafiles)
    checkout = os.path.join(cli.directory, 'quilt_checkout')

    result = cli.run(project=project, args=['build', "quilt-build-test.bst"])
    result.assert_success()

    result = cli.run(project=project, args=['checkout', "quilt-build-test.bst", checkout])
    result.assert_success()

    assert_contains(checkout, ['/patches/series','/patches/test','/src/hello.c'])