1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package art; 18 19 public class Test911 { 20 // CTS Entrypoint. We don't want to run 'AllTraces' since it breaks everytime somebody adds a new 21 // thread, which happens somewhat regularly. run()22 public static void run() throws Exception { 23 run(false); 24 } 25 run(boolean known_thread_env)26 public static void run(boolean known_thread_env) throws Exception { 27 Thread t = new Thread("Test911") { 28 @Override 29 public void run() { 30 try { 31 SameThread.doTest(); 32 33 System.out.println(); 34 35 OtherThread.doTestOtherThreadWait(); 36 37 System.out.println(); 38 39 OtherThread.doTestOtherThreadBusyLoop(); 40 41 System.out.println(); 42 43 if (known_thread_env) { 44 AllTraces.doTest(); 45 } 46 47 System.out.println(); 48 49 ThreadListTraces.doTest(); 50 51 System.out.println(); 52 53 Frames.doTest(); 54 } catch (Exception e) { 55 throw new RuntimeException(e); 56 } 57 } 58 }; 59 t.start(); 60 t.join(); 61 62 System.out.println("Done"); 63 } 64 } 65