8228722: jpackage RPM tests fail on some versions of rpmbuild JDK-8200758-branch
authordchuyko
Tue, 30 Jul 2019 09:58:18 +0300
branchJDK-8200758-branch
changeset 57591 6805e0ef7453
parent 57588 dac8f245de8e
child 57687 c56bbf4aaf98
8228722: jpackage RPM tests fail on some versions of rpmbuild Reviewed-by: herrick
test/jdk/tools/jpackage/linux/base/Base.java
test/jdk/tools/jpackage/linux/rpm/install.sh
--- 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