8205916: [test] Fix jdk/tools/launcher/RunpathTest to handle both, RPATH and RUNPATH
authorsimonis
Thu, 28 Jun 2018 09:06:54 +0200
changeset 50865 2c3edd0a6222
parent 50864 cc318277c142
child 50866 cb4b07d61aac
8205916: [test] Fix jdk/tools/launcher/RunpathTest to handle both, RPATH and RUNPATH Reviewed-by: martin, erikj
test/jdk/tools/launcher/RunpathTest.java
--- a/test/jdk/tools/launcher/RunpathTest.java	Thu Jun 28 07:22:59 2018 +0200
+++ b/test/jdk/tools/launcher/RunpathTest.java	Thu Jun 28 09:06:54 2018 +0200
@@ -57,14 +57,14 @@
         final TestResult tr = doExec(elfreaderCmd, "-d", javacmd);
         if (!tr.matches(expectedRpath)) {
             System.out.println(tr);
-            throw new RuntimeException("FAILED: RPATH strings " +
+            throw new RuntimeException("FAILED: RPATH/RUNPATH strings " +
                     expectedRpath + " not found in " + javaCmd);
         }
-        System.out.println(javacmd + " contains expected RPATHS");
+        System.out.println(javacmd + " contains expected RPATHS/RUNPATH");
     }
 
     void testRpath() {
-        String expectedRpath = ".*RPATH.*\\$ORIGIN/../lib.*";
+        String expectedRpath = ".*R(UN)?PATH.*\\$ORIGIN/../lib.*";
         elfCheck(javaCmd, expectedRpath);
     }