aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/java/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbedLauncher.java
blob: 92ff1eb06af7ee4b2f2e6e9fd0669b1518486d5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/********************************************************************
 * Copyright (c) 2006 Contributors. All rights reserved.
 * This program and the accompanying materials are made available
 * under the terms of the Eclipse Public License v 2.0
 * which accompanies this distribution and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
 *
 * Contributors:
 *   Adrian Colyer			Initial implementation
 *   Helen Hawkins          Converted to new interface (bug 148190)
 *******************************************************************/
package org.aspectj.systemtest.incremental.tools;


/**
 * command-line launcher for Ajde-like aspectj runs for use with
 * profiling tools.
 */
public class AjdeInteractionTestbedLauncher extends
		MultiProjectIncrementalTests {

	/**
	 * usage: AjdeInteractionTestbedLauncher srcDir projectName
	 * @param args workspace_root_dir project_name
	 */
	public static void main(String[] args) throws Exception {
		AjdeInteractionTestbedLauncher.testdataSrcDir = args[0];
		AjdeInteractionTestbedLauncher launcher = new AjdeInteractionTestbedLauncher(args[1]);
		launcher.setUp();
		launcher.buildProject(args[1]);
		//launcher.printBuildReport();
		launcher.tearDown();
	}

	public AjdeInteractionTestbedLauncher(String projectName) {
		String classPath = System.getProperty("java.class.path");
		((MultiProjTestCompilerConfiguration)getCompilerForProjectWithName(projectName)
				.getCompilerConfiguration()).setClasspath(classPath);
	}

	private void buildProject(String projectName) {
		initialiseProject(projectName);
		build(projectName);
	}


}