8228722: jpackage RPM tests fail on some versions of rpmbuild
Reviewed-by: herrick
--- a/test/jdk/tools/jpackage/linux/base/Base.java Mon Jul 29 18:38:00 2019 -0400
+++ b/test/jdk/tools/jpackage/linux/base/Base.java Tue Jul 30 09:58:18 2019 +0300
@@ -61,7 +61,7 @@
static String getRpmArch() throws Exception {
File out = File.createTempFile("rpmbuild", ".out");
out.deleteOnExit();
- int code = JPackageHelper.execute(out, "rpmbuild", "-E=%{_target_cpu}");
+ int code = JPackageHelper.execute(out, "rpmbuild", "--eval=%{_target_cpu}");
if (code != 0) {
throw new AssertionError("Error: unable to get rpm arch");
}
--- a/test/jdk/tools/jpackage/linux/rpm/install.sh Mon Jul 29 18:38:00 2019 -0400
+++ b/test/jdk/tools/jpackage/linux/rpm/install.sh Tue Jul 30 09:58:18 2019 +0300
@@ -1,4 +1,4 @@
-ARCH=$(rpmbuild -E='%{_target_cpu}')
+ARCH=$(rpmbuild --eval='%{_target_cpu}')
sudo rpm --install fileassociationstest-1.0-1.${ARCH}.rpm
sudo rpm --install installdirtest-1.0-1.${ARCH}.rpm
sudo rpm --install licensetest-1.0-1.${ARCH}.rpm