Examples of ExtractResourceSCM


Examples of org.jvnet.hudson.test.ExtractResourceSCM

public class MavenOptsTest extends HudsonTestCase {

    public void testEnvMavenOptsNoneInProject() throws Exception {
        configureDefaultMaven();
        MavenModuleSet m = createMavenProject();
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven-opts-echo.zip")));
        m.setGoals("validate");
        m.setAssignedLabel(createSlave(new EnvVars("MAVEN_OPTS", "-Dhudson.mavenOpt.test=foo")).getSelfLabel());
       
        buildAndAssertSuccess(m);
View Full Code Here

Examples of org.jvnet.hudson.test.ExtractResourceSCM

   
    public void testEnvMavenOptsOverriddenByProject() throws Exception {
        configureDefaultMaven();
        MavenModuleSet m = createMavenProject();
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven-opts-echo.zip")));
        m.setGoals("validate");
        m.setMavenOpts("-Dhudson.mavenOpt.test=bar");
        m.setAssignedLabel(createSlave(new EnvVars("MAVEN_OPTS", "-Dhudson.mavenOpt.test=foo")).getSelfLabel());
       
        buildAndAssertSuccess(m);
View Full Code Here

Examples of org.jvnet.hudson.test.ExtractResourceSCM

    }

    public void testEnvAndGlobalMavenOptsOverriddenByProject() throws Exception {
        configureDefaultMaven();
        MavenModuleSet m = createMavenProject();
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven-opts-echo.zip")));
        m.setGoals("validate");
        MavenModuleSet.DESCRIPTOR.setGlobalMavenOpts("-Dhudson.mavenOpt.test=bar");
        m.setAssignedLabel(createSlave(new EnvVars("MAVEN_OPTS", "-Dhudson.mavenOpt.test=foo")).getSelfLabel());
        m.setMavenOpts("-Dhudson.mavenOpt.test=baz");
       
View Full Code Here

Examples of org.jvnet.hudson.test.ExtractResourceSCM


    public void testGlobalMavenOpts() throws Exception {
        configureDefaultMaven();
        MavenModuleSet m = createMavenProject();
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven-opts-echo.zip")));
        m.setGoals("validate");
        MavenModuleSet.DESCRIPTOR.setGlobalMavenOpts("-Dhudson.mavenOpt.test=bar");
       
        buildAndAssertSuccess(m);
View Full Code Here

Examples of org.jvnet.hudson.test.ExtractResourceSCM

    }

    public void testGlobalMavenOptsOverridenByProject() throws Exception {
        configureDefaultMaven();
        MavenModuleSet m = createMavenProject();
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven-opts-echo.zip")));
        m.setGoals("validate");
        MavenModuleSet.DESCRIPTOR.setGlobalMavenOpts("-Dhudson.mavenOpt.test=bar");
        m.setMavenOpts("-Dhudson.mavenOpt.test=foo");
      
        buildAndAssertSuccess(m);
View Full Code Here

Examples of org.jvnet.hudson.test.ExtractResourceSCM

   
    @Bug(5651)
    public void testNewlinesInOptsRemoved() throws Exception {
        configureDefaultMaven("apache-maven-2.2.1", MavenInstallation.MAVEN_21);
        MavenModuleSet m = createMavenProject();
  m.setScm(new ExtractResourceSCM(getClass().getResource("maven-surefire-unstable.zip")));
        m.setMavenOpts("-XX:MaxPermSize=512m\r\n-Xms128m\r\n-Xmx512m");
        m.setGoals("install");
       
  assertBuildStatus(Result.UNSTABLE, m.scheduleBuild2(0).get());
  MavenModuleSetBuild pBuild = m.getLastBuild();
View Full Code Here

Examples of org.jvnet.hudson.test.ExtractResourceSCM

     */
    public void testEnvironmentVariableExpansion() throws Exception {
        configureDefaultMaven();
        MavenModuleSet m = createMavenProject();
        m.setMavenOpts("$FOO");
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven-opts-echo.zip")));
        m.setGoals("validate");
        m.setAssignedLabel(createSlave(new EnvVars("FOO", "-Dhudson.mavenOpt.test=foo -Dhudson.mavenOpt.test2=bar")).getSelfLabel());

        buildAndAssertSuccess(m);

View Full Code Here

Examples of org.jvnet.hudson.test.ExtractResourceSCM

  public void testSimpleMaven3BuildWithArgInterceptor_Goals() throws Exception {

    MavenModuleSet m = createMavenProject();
    MavenInstallation mavenInstallation = configureMaven3();
    m.setMaven(mavenInstallation.getName());
    m.setScm(new ExtractResourceSCM(getClass().getResource("maven3-project.zip")));
    m.setGoals("dummygoal"); // build would fail with this goal

    // add an action to build, redefining the goals and options to be
    // executed
    m.getBuildWrappersList().add(new TestMvnBuildWrapper("clean"));
View Full Code Here

Examples of org.jvnet.hudson.test.ExtractResourceSCM

  public void testSimpleMaven3BuildWithArgInterceptor_ArgBuilder() throws Exception {

    MavenModuleSet m = createMavenProject();
    MavenInstallation mavenInstallation = configureMaven3();
    m.setMaven(mavenInstallation.getName());
    m.setScm(new ExtractResourceSCM(getClass().getResource("maven-multimodule-unit-failure.zip")));
    m.setGoals("clean install"); // build would fail because of failing unit
                    // tests

    // add an action to build, adding argument to skip the test execution
    m.getBuildWrappersList().add(new TestMvnBuildWrapper(Arrays.asList("-DskipTests")));
View Full Code Here

Examples of org.jvnet.hudson.test.ExtractResourceSCM

    @Bug(4442)
    public void testEmptyModuleParsesAndBuilds() throws Exception {
        configureDefaultMaven();
        MavenModuleSet m = createMavenProject();
        m.getReporters().add(new TestReporter());
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven-empty-mod.zip")));
        buildAndAssertSuccess(m);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.