Package org.teavm.tooling

Examples of org.teavm.tooling.TeaVMTestTool


        } catch (ParseException e) {
            printUsage(options);
            return;
        }

        TeaVMTestTool tool = new TeaVMTestTool();
        tool.setOutputDir(new File(commandLine.getOptionValue("d", ".")));
        tool.setMinifying(commandLine.hasOption("m"));
        try {
            tool.setNumThreads(Integer.parseInt(commandLine.getOptionValue("t", "1")));
        } catch (NumberFormatException e) {
            System.err.println("Invalid number specified for -t option");
            printUsage(options);
            return;
        }
        if (commandLine.hasOption("a")) {
            tool.setAdapter(instantiateAdapter(commandLine.getOptionValue("a")));
        }
        if (commandLine.hasOption("T")) {
            for (String transformerType : commandLine.getOptionValues("T")) {
                tool.getTransformers().add(instantiateTransformer(transformerType));
            }
        }
        args = commandLine.getArgs();
        if (args.length == 0) {
            System.err.println("You did not specify any test classes");
            printUsage(options);
            return;
        }
        tool.getTestClasses().addAll(Arrays.asList(args));

        tool.setLog(new ConsoleTeaVMToolLog());
        tool.getProperties().putAll(System.getProperties());
        long start = System.currentTimeMillis();
        try {
            tool.generate();
        } catch (TeaVMToolException e) {
            e.printStackTrace(System.err);
            System.exit(-2);
        }
        System.out.println("Operation took " + (System.currentTimeMillis() - start) + " milliseconds");
View Full Code Here

TOP

Related Classes of org.teavm.tooling.TeaVMTestTool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.