forked from activecs/y-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathy-test
executable file
·30 lines (22 loc) · 859 Bytes
/
y-test
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
#!/usr/bin/env bash
# Runs all hybris tests for custom extensions, parameter for filtering custom extension list can be supplied
#
# source: https://github.com/sergaks/y-scripts
HYBRIS_DIR=`y-whereis`
if [ $? -ne 0 ]; then
echo "FAILURE"
exit 1
fi
CUSTOM_DIR="$HYBRIS_DIR/../custom"
if [ ! -d "$CUSTOM_DIR" ]; then
>&2 echo "No directory with custom hybris extensions exists, if you want run all hybris platform test run 'y-ant alltests' "
exit 1
fi
if [ -z "$1" ]; then
EXTENSIONS_ARR=`find $CUSTOM_DIR -name "extensioninfo.xml" | sed 's/.*\/\(.*\)\/extensioninfo.xml/\1/' `
else
EXTENSIONS_ARR=`find $CUSTOM_DIR -name "extensioninfo.xml" | sed 's/.*\/\(.*\)\/extensioninfo.xml/\1/' | grep "$1"`
fi
EXTENSIONS=`echo "$EXTENSIONS_ARR" | tr '\n' "," `
echo "Starting tests for \"$EXTENSIONS\""
y-ant alltests -Dtestclasses.extensions=$EXTENSIONS