mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Apply Pre/Post Custom Build Step test from Bob Monteleone
This commit is contained in:
parent
3c624f71bf
commit
50c552ee4d
2 changed files with 25 additions and 0 deletions
Binary file not shown.
|
@ -60,6 +60,7 @@ public class ManagedProject30MakefileTests extends TestCase {
|
|||
suite.addTest(new ManagedProject30MakefileTests("test30CopyandDeploy"));
|
||||
suite.addTest(new ManagedProject30MakefileTests("test30DeleteFile"));
|
||||
suite.addTest(new ManagedProject30MakefileTests("test30NoFilesToBuild"));
|
||||
suite.addTest(new ManagedProject30MakefileTests("testPreAndPostProcessBuildSteps"));
|
||||
suite.addTest(new ManagedProject30MakefileTests("test30_1"));
|
||||
suite.addTest(new ManagedProject30MakefileTests("test30_2"));
|
||||
|
||||
|
@ -391,6 +392,30 @@ public class ManagedProject30MakefileTests extends TestCase {
|
|||
buildDegenerativeProjects(projects, makefiles);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* tests 3.0 style tool integration: create pre-build and post-build steps and verify that
|
||||
* the proper commands are generated in the makefile which is created by the managedbuild system
|
||||
*/
|
||||
public void testPreAndPostProcessBuildSteps(){
|
||||
IPath[] makefiles = {
|
||||
Path.fromOSString("makefile"),
|
||||
Path.fromOSString("objects.mk"),
|
||||
Path.fromOSString("subdir.mk"),
|
||||
Path.fromOSString("sources.mk")};
|
||||
|
||||
IProject[] projects = createProjects("preAndPostBuildSteps", null, null, true);
|
||||
IProject project = projects[0];
|
||||
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
|
||||
IConfiguration config = info.getDefaultConfiguration();
|
||||
IFile projfile = project.getFile("main.cxx");
|
||||
config.setPreannouncebuildStep("Pre-announce Build Step");
|
||||
config.setPrebuildStep("echo 'executing Pre-Build Step' ");
|
||||
config.setPostannouncebuildStep("Post-announce Build Step");
|
||||
config.setPostbuildStep("echo 'executing Post-Build Step' ");
|
||||
buildProjects(projects, makefiles);
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* tests 3.0 style tool integration with pre and post process steps added to typical compile & link
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue