diff options
author | 2021-03-26 12:58:56 +0100 | |
---|---|---|
committer | 2021-03-26 12:58:56 +0100 | |
commit | f54922269049658bdd53adadd1055e15fd490fba (patch) | |
tree | c00a8a1f731d1d95e3f33f288527f2215b509f1a /mvn-test.sh | |
download | acme-scripts-f54922269049658bdd53adadd1055e15fd490fba.tar.gz acme-scripts-f54922269049658bdd53adadd1055e15fd490fba.zip |
Initial commit
Diffstat (limited to 'mvn-test.sh')
-rwxr-xr-x | mvn-test.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mvn-test.sh b/mvn-test.sh new file mode 100755 index 0000000..f85fd3d --- /dev/null +++ b/mvn-test.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +workingdir=`9p read acme/$winid/tag | head -1 | grep -oE '^/.*src' | sed 's/src//'` +cd $workingdir + +tests="$1" + +if [ -z "$1" ]; then + IFS='' + while read -r LINE || [ -n "$LINE" ]; do + tests="$LINE" + break + done + classname=`9p read acme/$winid/tag | grep -oE '[A-Za-z]*\.java' | sed 's/.java//' | head -1` + if [ ! -z $classname ] && [ ! -z $tests ] && [ $tests != $classname ]; then + tests=$classname'#'$tests + fi +fi + + +if [ ! -z "$tests" ]; then + mvn test -DtrimStackTrace=false -Dtest=$tests +else + mvn test -DtrimStackTrace=false +fi + + + |