forked from EventStore/EventStore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests.sh
executable file
·45 lines (42 loc) · 1.25 KB
/
run_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bash
while getopts "m:x:f:i:p" option
do
case $option in
m)
MONOPATH=$OPTARG
;;
x)
EXCLUDE="--where:cat!=$OPTARG"
;;
i)
INCLUDE="--where:cat==$OPTARG"
;;
f)
FILTER="--where:$OPTARG"
;;
p)
RUNPROJECTIONS="TRUE"
;;
?)
echo "Usage: run_tests.sh [-i IncludeCategory] [-x ExcludeCategory] [-f nUnitFilter] [-m /path/to/mono] [-p]"
echo "Defaults:"
echo " Mono Path: /opt/mono"
echo " Exclude: None"
echo " projections: false"
exit
;;
esac
done
if [[ $MONOPATH == "" ]]; then
MONOPATH="/opt/mono"
fi
LD_LIBRARY_PATH=bin/tests:$MONOPATH/lib/:$LD_LIBRARY_PATH mono tools/nunit-3.4.1/bin/nunit3-console.exe bin/tests/EventStore.Core.Tests.dll $EXCLUDE $INCLUDE $FILTER
rc=$?
# xsltproc tools/nunit-3.4.1/results.xslt TestResult.xml
# rm inter
if [[ $rc != 0 ]] ; then
exit $rc
fi
if [[ $RUNPROJECTIONS == "TRUE" ]]; then
LD_LIBRARY_PATH=bin/tests/:$MONOPATH/lib/:$LD_LIBRARY_PATH mono tools/nunit-3.4.1/bin/nunit3-console.exe bin/tests/EventStore.Projections.Core.Tests.dll $EXCLUDE
fi