1 /*
 2  * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
 3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 4  *
 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
 7  * published by the Free Software Foundation.
 8  *
 9  * This code is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  *
23  */
24 
25 /**
26  * @test
27  * @summary This is a test case for creating an AOT cache using the setup_aot/TestSetupAOT.java program, which
28  *          is used for running HotSpot tests in the "AOT mode"
29  *          (E.g., make test JTREG=AOT_JDK=true TEST=open/test/hotspot/jtreg/runtime/invokedynamic)
30  * @requires vm.cds
31  * @comment work around JDK-8345635
32  * @requires !vm.jvmci.enabled
33  * @library /test/lib /test/setup_aot
34  * @build TestSetupAOTTest JavacBenchApp TestSetupAOT
35  * @run driver jdk.test.lib.helpers.ClassFileInstaller
36  *                 TestSetupAOT
37  * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar
38  *                 TestSetupAOT
39  *                 TestSetupAOT$ToolOutput
40  *                 JavacBenchApp
41  *                 JavacBenchApp$ClassFile
42  *                 JavacBenchApp$FileManager
43  *                 JavacBenchApp$SourceFile
44  * @run driver TestSetupAOTTest
45  */
46 
47 import jdk.test.lib.cds.SimpleCDSAppTester;
48 import jdk.test.lib.process.OutputAnalyzer;
49 
50 public class TestSetupAOTTest {
51     public static void main(String... args) throws Exception {
52         SimpleCDSAppTester.of("TestSetupAOT")
53             .classpath("app.jar")
54             .appCommandLine("TestSetupAOT", ".")
55             .runAOTWorkflow();
56     }
57 }