diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-03-21 15:04:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-21 15:04:19 +0300 |
commit | a9c402ffdac727da165baf086d31f88e4f7aed27 (patch) | |
tree | 9c459434feba16258741930bdb82834bc8186327 /mcs/class/System.Web | |
parent | c1c09bc78d33dda29a4e53aa833f8ed09bbadaf2 (diff) |
[System.Web] Fix standalone-runner to return non-zero exit code on failure (#4562)gtk-git-repo
* [System.Web] Fix standalone-runner to return non-zero exit code on failure
We didn't notice that test runs with standalone-runner.exe failed
because it still exited with 0 in those cases.
Fixed that and the standalone tests that showed up as failed in
System.Web.Extensions (some differences likely from referencesource
code import).
* Fix replacement logic for Consts.cs.in to use Windows paths
Diffstat (limited to 'mcs/class/System.Web')
-rw-r--r-- | mcs/class/System.Web/Test/tools/standalone-runner.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mcs/class/System.Web/Test/tools/standalone-runner.cs b/mcs/class/System.Web/Test/tools/standalone-runner.cs index d3de8243332..e8f05421b5f 100644 --- a/mcs/class/System.Web/Test/tools/standalone-runner.cs +++ b/mcs/class/System.Web/Test/tools/standalone-runner.cs @@ -73,13 +73,16 @@ namespace StandAloneRunner static void Main (string[] args) { try { - Run (args); + var success = Run (args); + + if (!success) + Environment.Exit (1); } catch (Exception ex) { Die ("Exception caught:{0}{1}", Environment.NewLine, ex.ToString ()); } } - static void Run (string[] args) + static bool Run (string[] args) { bool showHelp = false; string testName = null; @@ -177,6 +180,8 @@ namespace StandAloneRunner writer.Dispose (); } } + + return failedCounter == 0; } static string FormatReport (StandaloneTest test) |