launcher/http/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java
branchclosure
changeset 1525 777bd3ed81ba
parent 1513 ba912ef24b27
child 1530 45c50b9c7dc4
     1.1 --- a/launcher/http/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java	Wed Apr 30 15:04:10 2014 +0200
     1.2 +++ b/launcher/http/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java	Mon May 05 10:16:30 2014 +0200
     1.3 @@ -25,9 +25,10 @@
     1.4  import java.io.Reader;
     1.5  import java.net.MalformedURLException;
     1.6  import java.net.URL;
     1.7 +import java.util.HashSet;
     1.8 +import java.util.Set;
     1.9  import java.util.jar.JarFile;
    1.10  import java.util.logging.Level;
    1.11 -import org.apidesign.vm4brwsr.Bck2Brwsr;
    1.12  
    1.13  /**
    1.14   * Lightweight server to launch Bck2Brwsr applications and tests.
    1.15 @@ -35,6 +36,7 @@
    1.16   * execution engine.
    1.17   */
    1.18  final class Bck2BrwsrLauncher extends BaseHTTPLauncher {
    1.19 +    private Set<String> testClasses = new HashSet<String>();
    1.20      
    1.21      public Bck2BrwsrLauncher(String cmd) {
    1.22          super(cmd);
    1.23 @@ -47,7 +49,13 @@
    1.24  
    1.25      @Override
    1.26      String compileJar(JarFile jar) throws IOException {
    1.27 -        return CompileCP.compileJAR(jar);
    1.28 +        return CompileCP.compileJAR(jar, testClasses);
    1.29 +    }
    1.30 +
    1.31 +    @Override
    1.32 +    public InvocationContext createInvocation(Class<?> clazz, String method) {
    1.33 +        testClasses.add(clazz.getName().replace('.', '/'));
    1.34 +        return super.createInvocation(clazz, method);
    1.35      }
    1.36  
    1.37      @Override String compileFromClassPath(URL f, Res loader) throws IOException {