Add testcases for pacman
This commit is contained in:
parent
7065df1b32
commit
5bde44a3c2
|
@ -1,7 +1,7 @@
|
|||
from . import cmd
|
||||
|
||||
def get_version(name, conf, callback):
|
||||
referree = conf['pacman']
|
||||
referree = conf.get('pacman') or name
|
||||
c = "LANG=C pacman -Si %s | grep -F Version | awk '{print $3}'" % referree
|
||||
conf['cmd'] = c
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
import shutil
|
||||
import pytest
|
||||
from tests.helper import ExternalVersionTestCase
|
||||
|
||||
|
||||
@pytest.mark.skipif(shutil.which("pacman") is None,
|
||||
reason="requires pacman command")
|
||||
class PacmanTest(ExternalVersionTestCase):
|
||||
def test_pacman(self):
|
||||
self.assertEqual(self.sync_get_version("ipw2100-fw", {"pacman": None}), "1.3-7")
|
||||
|
||||
def test_pacman_strip_release(self):
|
||||
self.assertEqual(self.sync_get_version("ipw2100-fw", {"pacman": None, "strip-release": 1}), "1.3")
|
Loading…
Reference in New Issue