diff --git a/scripts/test/argument-forwarding-tests.ps1 b/scripts/test/argument-forwarding-tests.ps1
index 8316aa200..2f96fa69f 100644
--- a/scripts/test/argument-forwarding-tests.ps1
+++ b/scripts/test/argument-forwarding-tests.ps1
@@ -8,23 +8,24 @@
$TestPackagesPath = "$RepoRoot\tests\packages"
$ArgTestRoot = "$RepoRoot\test\ArgumentForwardingTests"
-$ArgTestBinRoot = "$RepoRoot\artifacts\tests\arg-forwarding"
+$ArgTestOutputRoot = "$RepoRoot\artifacts\tests\arg-forwarding"
+$ArgTestBin = "$ArgTestOutputRoot\$Configuration\dnxcore50"
-dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestBinRoot" --configuration "$Configuration" "$ArgTestRoot\Reflector"
+dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestOutputRoot" --configuration "$Configuration" "$ArgTestRoot\Reflector"
if (!$?) {
- Write-Host Command failed: dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestBinRoot" --configuration "$Configuration" "$ArgTestRoot\Reflector"
+ Write-Host Command failed: dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestOutputRoot" --configuration "$Configuration" "$ArgTestRoot\Reflector"
Exit 1
}
-dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestBinRoot" --configuration "$Configuration" "$ArgTestRoot\ArgumentForwardingTests"
+dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestOutputRoot" --configuration "$Configuration" "$ArgTestRoot\ArgumentForwardingTests"
if (!$?) {
- Write-Host Command failed: dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestBinRoot" --configuration "$Configuration" "$ArgTestRoot\ArgumentForwardingTests"
+ Write-Host Command failed: dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestOutputRoot" --configuration "$Configuration" "$ArgTestRoot\ArgumentForwardingTests"
Exit 1
}
-cp "$ArgTestRoot\Reflector\reflector_cmd.cmd" "$ArgTestBinRoot"
+cp "$ArgTestRoot\Reflector\reflector_cmd.cmd" "$ArgTestBin"
-pushd $ArgTestBinRoot
+pushd "$ArgTestBin"
& ".\corerun" "xunit.console.netcore.exe" "ArgumentForwardingTests.dll" -xml "$_-testResults.xml" -notrait category=failing
$exitCode = $LastExitCode
diff --git a/scripts/test/argument-forwarding-tests.sh b/scripts/test/argument-forwarding-tests.sh
old mode 100644
new mode 100755
index 008caee92..87cf5d423
--- a/scripts/test/argument-forwarding-tests.sh
+++ b/scripts/test/argument-forwarding-tests.sh
@@ -17,14 +17,15 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source "$DIR/../common/_common.sh"
-ArgTestRoot = "$REPOROOT/test/ArgumentForwardingTests"
-ArgTestBinRoot="$REPOROOT/artifacts/tests/arg-forwarding"
+ArgTestRoot="$REPOROOT/test/ArgumentForwardingTests"
+ArgTestOutputRoot="$REPOROOT/artifacts/tests/arg-forwarding"
+ArgTestBin="$ArgTestOutputRoot/$CONFIGURATION/dnxcore50"
-dotnet publish --framework "dnxcore50" --runtime "$RID" --output "$ArgTestBinRoot" --configuration "$CONFIGURATION" "$ArgTestRoot/Reflector"
-dotnet publish --framework "dnxcore50" --runtime "$RID" --output "$ArgTestBinRoot" --configuration "$CONFIGURATION" "$ArgTestRoot/ArgumentForwardingTests"
+dotnet publish --framework "dnxcore50" --runtime "$RID" --output "$ArgTestOutputRoot" --configuration "$CONFIGURATION" "$ArgTestRoot/Reflector"
+dotnet publish --framework "dnxcore50" --runtime "$RID" --output "$ArgTestOutputRoot" --configuration "$CONFIGURATION" "$ArgTestRoot/ArgumentForwardingTests"
-cp "$ArgTestRoot/Reflector/reflector_cmd.cmd" "$ArgTestBinRoot"
-pushd $TestBinRoot
-./corerun "xunit.console.netcore.exe" "ArgumentForwardingTests.dll" -xml "ArgumentForwardingTests-testResults.xml" -notrait category=failing
-popd
\ No newline at end of file
+
+pushd "$ArgTestBin"
+ ./corerun "xunit.console.netcore.exe" "ArgumentForwardingTests.dll" -xml "ArgumentForwardingTests-testResults.xml" -notrait category=failing
+popd
diff --git a/scripts/test/runtests.ps1 b/scripts/test/runtests.ps1
index 84d91b76a..cee774e8b 100644
--- a/scripts/test/runtests.ps1
+++ b/scripts/test/runtests.ps1
@@ -74,9 +74,8 @@ $TestScripts | ForEach-Object {
$exitCode = $LastExitCode
if ($exitCode -ne 0) {
$failingTests += "$_"
+ $failCount += 1
}
-
- $failCount += 1
}
if ($failCount -ne 0) {
diff --git a/scripts/test/runtests.sh b/scripts/test/runtests.sh
index d4e8ab718..82b713d20 100755
--- a/scripts/test/runtests.sh
+++ b/scripts/test/runtests.sh
@@ -67,9 +67,9 @@ for script in ${TestScripts[@]}
do
"$REPOROOT/scripts/test/$script"
exitCode=$?
- failCount+=1
if [ $exitCode -ne 0 ]; then
failedTests+=($script)
+ failCount+=1
fi
done
diff --git a/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs b/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs
index d88e7b822..30835d159 100644
--- a/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs
@@ -34,7 +34,7 @@ namespace Microsoft.DotNet.Cli.Utils
///
///
///
- public static string EscapeAndConcatenateArgArrayForCmd(IEnumerable args)
+ public static string EscapeAndConcatenateArgArrayForCmdProcessStart(IEnumerable args)
{
return string.Join(" ", EscapeArgArrayForCmd(args));
}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolver.cs
index 1910609bf..a7b9c6692 100644
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolver.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/CommandResolver.cs
@@ -47,7 +47,7 @@ namespace Microsoft.DotNet.Cli.Utils
}
else
{
- var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArray(args);
+ var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(args);
return new CommandSpec(commandName, escapedArgs, CommandResolutionStrategy.Path);
}
@@ -198,7 +198,7 @@ namespace Microsoft.DotNet.Cli.Utils
}
else
{
- var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArray(args);
+ var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(args);
return new CommandSpec(fileName, escapedArgs, CommandResolutionStrategy.NugetPackage);
}
@@ -240,7 +240,7 @@ namespace Microsoft.DotNet.Cli.Utils
}
else
{
- var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArray(args);
+ var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(args);
return new CommandSpec(commandPath, escapedArgs, resolutionStrategy);
}
}
diff --git a/test/ArgumentForwardingTests/ArgumentForwardingTests/ArgumentForwardingTests.cs b/test/ArgumentForwardingTests/ArgumentForwardingTests/ArgumentForwardingTests.cs
index aba6e17de..2a0794d1f 100644
--- a/test/ArgumentForwardingTests/ArgumentForwardingTests/ArgumentForwardingTests.cs
+++ b/test/ArgumentForwardingTests/ArgumentForwardingTests/ArgumentForwardingTests.cs
@@ -18,7 +18,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
{
public class ArgumentForwardingTests : TestBase
{
- private static readonly string s_reflectorExeName = "reflector" + Constants.ExeSuffix;
+ private static readonly string s_reflectorExeName = "Reflector" + Constants.ExeSuffix;
private static readonly string s_reflectorCmdName = "reflector_cmd";
private string ReflectorPath { get; set; }
@@ -106,6 +106,11 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
[InlineData(@"a\""b \\ cd ""\e f\"" \\""\\\")]
public void TestArgumentForwardingCmd(string testUserArgument)
{
+ if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ return;
+ }
+
// Get Baseline Argument Evaluation via Reflector
// This does not need to be different for cmd because
// it only establishes what the string[] args should be
@@ -247,6 +252,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
};
proc.Start();
+ proc.WaitForExit();
var stdOut = proc.StandardOutput.ReadToEnd();
Assert.Equal(0, proc.ExitCode);
diff --git a/test/Microsoft.DotNet.Tools.Compiler.Tests/project.json b/test/Microsoft.DotNet.Tools.Compiler.Tests/project.json
index 24c188a38..b16b12e9e 100644
--- a/test/Microsoft.DotNet.Tools.Compiler.Tests/project.json
+++ b/test/Microsoft.DotNet.Tools.Compiler.Tests/project.json
@@ -2,9 +2,6 @@
"version": "1.0.0-*",
"dependencies": {
- "NETStandard.Library": "1.0.0-rc2-23704",
- "Microsoft.NETCore.TestHost" : "1.0.0-*",
-
"NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.NETCore.TestHost" : "1.0.0-rc2-23704",
diff --git a/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs b/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs
index cfbe30b67..44bd9e5c5 100644
--- a/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs
+++ b/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs
@@ -175,6 +175,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
}
[Fact]
+ [ActiveIssue(982)]
public void PublishScriptsRun()
{
// create unique directories in the 'temp' folder
diff --git a/test/PackagedCommands/Consumers/AppWithToolDependency/project.json.template b/test/PackagedCommands/Consumers/AppWithToolDependency/project.json.template
index 9419a649d..71fb4db01 100644
--- a/test/PackagedCommands/Consumers/AppWithToolDependency/project.json.template
+++ b/test/PackagedCommands/Consumers/AppWithToolDependency/project.json.template
@@ -5,7 +5,7 @@
},
"dependencies": {
- "NETStandard.Library": "1.0.0-rc2-23714"
+ "NETStandard.Library": "1.0.0-rc2-23704"
},
"frameworks": {