tests - dynamically find deb/rpm name

This commit is contained in:
bunkerity 2022-07-19 14:20:53 +02:00
parent 2205043e75
commit 458ebe07ff
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
1 changed files with 3 additions and 3 deletions

View File

@ -38,11 +38,11 @@ class LinuxTest(Test) :
proc = run(cmd, shell=True)
if proc.returncode != 0 :
raise(Exception("docker run failed (linux stack)"))
cmd = "docker exec linux-" + distro + " "
cmd = "docker exec linux-" + distro + " "
if distro in ["ubuntu", "debian"] :
cmd += " apt install -y /opt/*.deb"
cmd += " apt install -y /opt/\\$(ls /opt | grep deb)"
elif distro in ["centos", "fedora"] :
cmd += " dnf install -y /opt/*.rpm"
cmd += " dnf install -y /opt/\\$(ls /opt | grep rpm)"
proc = run(cmd, shell=True)
if proc.returncode != 0 :
raise(Exception("docker exec apt install failed (linux stack)"))