Mercurial > hg > truffle
annotate graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/CompileTheWorldTest.java @ 13365:bfc5acea3c12
consolidated mechanism for overriding options in CompileTheWorld
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 17 Dec 2013 17:09:22 +0100 |
parents | 0e5c4f9fa9a5 |
children | d90e5c22ba55 |
rev | line source |
---|---|
9108 | 1 /* |
2 * Copyright (c) 2013, 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 package com.oracle.graal.hotspot.test; | |
24 | |
9966
4158612eca60
GraalOptions: use static import
Bernhard Urban <bernhard.urban@jku.at>
parents:
9911
diff
changeset
|
25 import static com.oracle.graal.phases.GraalOptions.*; |
4158612eca60
GraalOptions: use static import
Bernhard Urban <bernhard.urban@jku.at>
parents:
9911
diff
changeset
|
26 |
9108 | 27 import org.junit.*; |
28 | |
29 import com.oracle.graal.compiler.test.*; | |
30 import com.oracle.graal.hotspot.*; | |
13365
bfc5acea3c12
consolidated mechanism for overriding options in CompileTheWorld
Doug Simon <doug.simon@oracle.com>
parents:
13353
diff
changeset
|
31 import com.oracle.graal.hotspot.CompileTheWorld.Config; |
9108 | 32 |
33 /** | |
34 * Tests {@link CompileTheWorld} functionality. | |
35 */ | |
36 public class CompileTheWorldTest extends GraalCompilerTest { | |
37 | |
38 @Test | |
39 public void testRtJar() throws Throwable { | |
9966
4158612eca60
GraalOptions: use static import
Bernhard Urban <bernhard.urban@jku.at>
parents:
9911
diff
changeset
|
40 boolean originalSetting = ExitVMOnException.getValue(); |
9108 | 41 // Compile a couple classes in rt.jar |
42 String file = System.getProperty("java.home") + "/lib/rt.jar"; | |
13365
bfc5acea3c12
consolidated mechanism for overriding options in CompileTheWorld
Doug Simon <doug.simon@oracle.com>
parents:
13353
diff
changeset
|
43 new CompileTheWorld(file, new Config(null), 1, 5, false).compile(); |
9966
4158612eca60
GraalOptions: use static import
Bernhard Urban <bernhard.urban@jku.at>
parents:
9911
diff
changeset
|
44 ExitVMOnException.setValue(originalSetting); |
9108 | 45 } |
46 | |
47 } |