Skip to content
Permalink
Browse files
[JENKINS-48194] Reverting binary incompatibility
  • Loading branch information
fcojfernandez committed Nov 23, 2017
1 parent a830f38 commit 278ee8c5d9bd46d6b1d651f6d7e048e7eaf66eba
@@ -54,6 +54,24 @@
private final boolean unstableIfWarnings;
private final boolean doNotUseChcpCommand;

/**
* When this builder is created in the project configuration step,
* the builder object will be created from the strings below.
*
* @param msBuildName The Visual Studio logical name
* @param msBuildFile The name/location of the MSBuild file
* @param cmdLineArgs Whitespace separated list of command line arguments
* @param buildVariablesAsProperties If true, pass build variables as properties to MSBuild
* @param continueOnBuildFailure If true, job will continue dispite of MSBuild build failure
* @param unstableIfWarnings If true, job will be unstable if there are warnings
*/
@Deprecated
@SuppressWarnings("unused")
public MsBuildBuilder(String msBuildName, String msBuildFile, String cmdLineArgs, boolean buildVariablesAsProperties, boolean continueOnBuildFailure, boolean unstableIfWarnings) {
// By default, doNotUseChcpCommand=false
this(msBuildName, msBuildFile, cmdLineArgs, buildVariablesAsProperties, continueOnBuildFailure, unstableIfWarnings, false);
}

/**
* When this builder is created in the project configuration step,
* the builder object will be created from the strings below.
@@ -1,6 +1,10 @@
package hudson.plugins.msbuild;

import hudson.model.FreeStyleProject;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.recipes.LocalData;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -10,6 +14,9 @@
*/
public class MsBuildBuilderTest {

@Rule
public JenkinsRule r = new JenkinsRule();

@Test
public void shouldStripQuotedArguments() {
final String quotedPlatform = "/p:Platform=\"Any CPU\"";
@@ -40,4 +47,15 @@ public void endEscapedCharacter() {
assertEquals(oneArgumentsWithEndBackslash, tokenizedArgs[0]);
}

@Test
@LocalData
public void configRoundtrip() {
try {
FreeStyleProject p = (FreeStyleProject)r.jenkins.getAllItems().get(0);
r.configRoundtrip(p);
} catch (Exception e) {
throw new AssertionError("Not valid configuration for MsBuild");
}
}

}
Binary file not shown.

0 comments on commit 278ee8c

Please sign in to comment.