forked from KeYProject/key
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproveRules
executable file
·69 lines (54 loc) · 1.38 KB
/
proveRules
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
#
# ProveRules documentation can be found at: https://keyproject.github.io/key-docs/devel/ProveRules/
#
LIST_TESTS_FLAG=--list-tests
HELP_FLAG=--help
list_help() {
echo "Usage: proveRules [$HELP_FLAG] | [$LIST_TESTS_FLAG] | <test names>"
}
resolve_symlink() {
TARGET=`ls -l "$1"| awk '/\ ->\ /{print $NF}'`
if [ -n "$TARGET" ] ; then
RESULT="$TARGET"
case "$RESULT" in
/*) break ;; # absolute symlink
*) RESULT=`dirname "$0"`/"$RESULT" ;; # relative symlink
esac
else
RESULT=$1
fi
echo "$RESULT"
}
SCRIPTLOCATION=`resolve_symlink "$0"`
SCRIPTFOLDER=`dirname $SCRIPTLOCATION`
KEY_HOME="$SCRIPTFOLDER/.."
#
# Parse command line parameters
#
testCases=""
while [ "$#" -ne 0 ]
do
case $1 in
$LIST_TESTS_FLAG)
$KEY_HOME/gradlew -p $KEY_HOME -DmainClass=de.uka.ilkd.key.proof.proverules.ListProveRulesTestCases :key.core:executeInTest
exit
;;
-h|--help|-?)
list_help
exit
;;
-*)
echo Unrecognised option: $1
exit
;;
*)
testCases="$testCases --tests de.uka.ilkd.key.proof.proverules.ProveRulesTest.$1"
shift
;;
esac
done
#
# Run JUnit via gradle
#
$KEY_HOME/gradlew -p $KEY_HOME :key.core:testProofRules $testCases