1 /* |
1 /* |
2 * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
72 } |
72 } |
73 |
73 |
74 private void runTest(String args[]) { |
74 private void runTest(String args[]) { |
75 try { |
75 try { |
76 boolean addTestVMOptions = true; |
76 boolean addTestVMOptions = true; |
77 String[] allArgs = Arrays.copyOf(args, args.length + 4); |
77 String[] allArgs = Arrays.copyOf(args, args.length + 5); |
78 allArgs[args.length] = "-XX:AOTLibrary=" |
78 allArgs[args.length] = "-XX:+UnlockExperimentalVMOptions"; |
|
79 allArgs[args.length + 1] = "-XX:AOTLibrary=" |
79 + "." + File.separator |
80 + "." + File.separator |
80 + "libMultipleAOTLibraryTest1.so" |
81 + "libMultipleAOTLibraryTest1.so" |
81 + File.pathSeparator |
82 + File.pathSeparator |
82 + "." + File.separator |
83 + "." + File.separator |
83 + "libMultipleAOTLibraryTest2.so"; |
84 + "libMultipleAOTLibraryTest2.so"; |
84 allArgs[args.length + 1] = "-XX:+PrintAOT"; |
85 allArgs[args.length + 2] = "-XX:+PrintAOT"; |
85 allArgs[args.length + 2] = "-XX:+UseAOT"; |
86 allArgs[args.length + 3] = "-XX:+UseAOT"; |
86 allArgs[args.length + 3] = HelloWorldPrinter.class.getName(); |
87 allArgs[args.length + 4] = HelloWorldPrinter.class.getName(); |
87 CommandLineOptionTest.verifyJVMStartup(EXPECTED_OUTPUT, |
88 CommandLineOptionTest.verifyJVMStartup(EXPECTED_OUTPUT, |
88 UNEXPECTED_OUTPUT, "Unexpected exit code", |
89 UNEXPECTED_OUTPUT, "Unexpected exit code", |
89 "Unexpected output", ExitCode.OK, addTestVMOptions, |
90 "Unexpected output", ExitCode.OK, addTestVMOptions, |
90 allArgs); |
91 allArgs); |
91 } catch (Throwable t) { |
92 } catch (Throwable t) { |