Fix packaging tests on debian 10 (#48138)
* Fix packaging tests on debian 10 - lintian no longer has `--fail-on-warnings` - Systemd has a build number / version after it's acutal version ``` alpar@alpar-ci-debian-10-1015-1517:~$ systemd --version systemd 241 (241) +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid ```
This commit is contained in:
parent
ecd62934f6
commit
13df6beb53
|
@ -38,7 +38,11 @@ public class DebMetadataTests extends PackagingTestCase {
|
|||
}
|
||||
|
||||
public void test05CheckLintian() {
|
||||
sh.run("lintian --fail-on-warnings " + FileUtils.getDistributionFile(distribution()));
|
||||
String extraArgs = "";
|
||||
if (sh.run("lintian --help").stdout.contains("fail-on-warnings")) {
|
||||
extraArgs = "--fail-on-warnings ";
|
||||
}
|
||||
sh.run("lintian " + extraArgs + FileUtils.getDistributionFile(distribution()));
|
||||
}
|
||||
|
||||
public void test06Dependencies() {
|
||||
|
|
|
@ -191,7 +191,7 @@ public class PackageTests extends PackagingTestCase {
|
|||
} else {
|
||||
|
||||
final Result versionResult = sh.run("systemctl --version");
|
||||
final Matcher matcher = Pattern.compile("^systemd (\\d+)\n").matcher(versionResult.stdout);
|
||||
final Matcher matcher = Pattern.compile("^systemd (\\d+)").matcher(versionResult.stdout);
|
||||
matcher.find();
|
||||
final int version = Integer.parseInt(matcher.group(1));
|
||||
|
||||
|
|
Loading…
Reference in New Issue