Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-05-27 10:25:38 +0300
committerJiyoung Yun <jy910.yun@samsung.com>2016-06-07 05:53:03 +0300
commitf3049c6062d09a40577ef17b2d6ba1c047e7207d (patch)
tree36bd946e8775c930c94f032f7db001d06394ab7f /run-test.sh
parentfbcdca60387bc53695f6e41c146a61460a318f15 (diff)
Handle a ctrl-c interrupt on test runner
If a ctrl-c interrupt occurs, the test runner will stop and return the total number of failed. Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
Diffstat (limited to 'run-test.sh')
-rwxr-xr-xrun-test.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/run-test.sh b/run-test.sh
index 4e0d3c0ce7..1c518cb79d 100755
--- a/run-test.sh
+++ b/run-test.sh
@@ -55,6 +55,18 @@ usage()
exit 1
}
+# Handle Ctrl-C.
+function handle_ctrl_c {
+ local errorSource='handle_ctrl_c'
+
+ echo ""
+ echo "Cancelling test execution."
+ exit $TestsFailed
+}
+
+# Register the Ctrl-C handler
+trap handle_ctrl_c INT
+
ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Location parameters
# OS/ConfigurationGroup defaults