mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
packages/test_device: add test for initialise_pkgbuilds_dir fixture
This commit is contained in:
parent
f5e3fa46ad
commit
39be2b2fb6
1 changed files with 11 additions and 2 deletions
|
@ -39,9 +39,10 @@ ONEPLUS_ENCHILADA_PKG = f'device-{ONEPLUS_ENCHILADA}'
|
|||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def enchilada_pkgbuild(initialise_pkgbuilds_dir):
|
||||
def enchilada_pkgbuild(initialise_pkgbuilds_dir: ConfigStateHolder):
|
||||
config = initialise_pkgbuilds_dir
|
||||
config.try_load_file()
|
||||
return parse_pkgbuild(os.path.join('device', ONEPLUS_ENCHILADA_PKG))[0]
|
||||
return parse_pkgbuild(os.path.join('device', ONEPLUS_ENCHILADA_PKG), config)[0]
|
||||
|
||||
|
||||
def validate_oneplus_enchilada(d: Device):
|
||||
|
@ -50,6 +51,14 @@ def validate_oneplus_enchilada(d: Device):
|
|||
assert d.package and d.package.name == ONEPLUS_ENCHILADA_PKG
|
||||
|
||||
|
||||
def test_fixture_initialise_pkgbuilds_dir(initialise_pkgbuilds_dir: ConfigStateHolder):
|
||||
assert os.path.exists(os.path.join(config.get_path('pkgbuilds'), 'device'))
|
||||
|
||||
|
||||
def test_fixture_pkgbuilds_dir(pkgbuilds_dir):
|
||||
assert os.path.exists(os.path.join(pkgbuilds_dir, 'device'))
|
||||
|
||||
|
||||
def test_get_device():
|
||||
name = ONEPLUS_ENCHILADA
|
||||
d = get_device(name)
|
||||
|
|
Loading…
Add table
Reference in a new issue