From b7e209690cb93f5fc6f31155776da0209a01e249 Mon Sep 17 00:00:00 2001 From: Chris Cheetham Date: Tue, 7 Aug 2018 18:46:55 -0400 Subject: [PATCH] Scripts for running unit and feature tests on Linux/OSX --- Tooling.sln | 2 ++ scripts/feature-test.sh | 12 ++++++++++++ scripts/unit-test.sh | 12 ++++++++++++ 3 files changed, 26 insertions(+) create mode 100755 scripts/feature-test.sh create mode 100755 scripts/unit-test.sh diff --git a/Tooling.sln b/Tooling.sln index 3086d74..bfca196 100644 --- a/Tooling.sln +++ b/Tooling.sln @@ -11,6 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution CONTRIBUTING.md = CONTRIBUTING.md LICENSE = LICENSE README.md = README.md + scripts\unit-test.sh = scripts\unit-test.sh + scripts\feature-test.sh = scripts\feature-test.sh EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D86CBDAE-DF37-4BDF-8F81-C79FB11DEC0D}" diff --git a/scripts/feature-test.sh b/scripts/feature-test.sh new file mode 100755 index 0000000..d2e2b61 --- /dev/null +++ b/scripts/feature-test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +basedir=$(dirname $0)/.. +featureTestDir=$basedir/feature +rc=0 + +for project in $featureTestDir/* +do + dotnet test $project + [[ $? != 0 ]] && rc=1 +done +exit $rc diff --git a/scripts/unit-test.sh b/scripts/unit-test.sh new file mode 100755 index 0000000..3c67abe --- /dev/null +++ b/scripts/unit-test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +basedir=$(dirname $0)/.. +unitTestDir=$basedir/test +rc=0 + +for project in $unitTestDir/* +do + dotnet test $project + [[ $? != 0 ]] && rc=1 +done +exit $rc