-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathruntests
More file actions
executable file
·34 lines (29 loc) · 750 Bytes
/
Copy pathruntests
File metadata and controls
executable file
·34 lines (29 loc) · 750 Bytes
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
#!/bin/bash
# Wrap execution of maven for unit and integration testing
#
# $1 low-order node of package name, e.g. 6 for
# package com.neopragma.legacy.round6
#
# $2 class name pattern to include, e.g. *Test, *IT
if [ "$#" == 0 ]
then
echo "Usage:"
echo runtests round level
echo Example 1:
echo runtests 4 unit
echo or
echo runtests 4
echo mvn -Dtest="com.neopragma.legacy.round4.*Test" test
echo Example 2:
echo runtests 3 integration
echo mvn -Dtest="com.neopragma.legacy.round3.*IT" test
echo
exit 0
fi
PATTERN="*Test"
if [ "$#" > 1 ] && [ "$2" == "integration" ]
then
PATTERN="*IT"
fi
echo mvn -Dtest="com.neopragma.legacy.round$1.$PATTERN" test
mvn -Dtest="com.neopragma.legacy.round$1.$PATTERN" test