/*
 * Copyright (c) 2013, the Dart project authors.
 * 
 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.dart.compiler;

import com.google.dart.compiler.ast.AstTests;
import com.google.dart.compiler.common.CommonTests;
import com.google.dart.compiler.end2end.End2EndTests;
import com.google.dart.compiler.parser.ParserTests;
import com.google.dart.compiler.resolver.ResolverTests;
import com.google.dart.compiler.util.UtilTests;

import junit.framework.Test;
import junit.framework.TestSuite;

public class TestAll {
  
  public static Test suite() {
    initSdk();
    
    TestSuite suite = new TestSuite("Tests in " + TestAll.class.getPackage().getName());

    suite.addTest(CompilerTests.suite());
    suite.addTest(AstTests.suite());
    suite.addTest(CommonTests.suite());
    suite.addTest(End2EndTests.suite());
    suite.addTest(ParserTests.suite());
    suite.addTest(ResolverTests.suite());
    //suite.addTest(TypeTests.suite());
    suite.addTest(UtilTests.suite());

    return suite;
  }
  
  private static final String DART_SDK_PROPERTY_NAME = "com.google.dart.sdk";
  private static final String DART_SDK_ENV_VARIABLE = "DART_SDK";
  
  private static void initSdk() {
    String sdkProperty = System.getProperty(DART_SDK_PROPERTY_NAME);
    
    if (sdkProperty == null) {
      sdkProperty = System.getenv(DART_SDK_ENV_VARIABLE);
      
      if (sdkProperty != null) {
        System.setProperty(DART_SDK_PROPERTY_NAME, sdkProperty);
      }
    }
  }
  
}

@@ -47,18 +47,17 @@
 hors.%0A *
- 
 %0A
+
  * Licen
@@ -225,17 +225,16 @@
 se at%0A *
- 
 %0A * http
@@ -273,17 +273,16 @@
 .html%0A *
- 
 %0A * Unle
@@ -1028,19 +1028,17 @@
 stAll %7B%0A
-  
 %0A
+
   public
@@ -1064,28 +1064,8 @@
 ) %7B%0A
-    initSdk();%0A    %0A
     
@@ -1497,479 +1497,7 @@
   %7D%0A
-  %0A  private static final String DART_SDK_PROPERTY_NAME = %22com.google.dart.sdk%22;%0A  private static final String DART_SDK_ENV_VARIABLE = %22DART_SDK%22;%0A  %0A  private static void initSdk() %7B%0A    String sdkProperty = System.getProperty(DART_SDK_PROPERTY_NAME);%0A    %0A    if (sdkProperty == null) %7B%0A      sdkProperty = System.getenv(DART_SDK_ENV_VARIABLE);%0A      %0A      if (sdkProperty != null) %7B%0A        System.setProperty(DART_SDK_PROPERTY_NAME, sdkProperty);%0A      %7D%0A    %7D%0A  %7D%0A  
 %0A%7D%0A

Add the services_test plugin to the buildbot_test suite.