summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2016-03-13 12:45:26 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2016-03-13 12:45:26 +0200
commitd07d0a9a13fa306fbb4d5cca266da1b33ff931d4 (patch)
tree2c422cfdbaeaec5712d9f877e197e43caec2b132
parentd2e9c9feba344e0aef29eb83135cb86ef6df73f8 (diff)
Infras for efl tests
-rwxr-xr-xScripts/ExactnessStats.sh77
-rw-r--r--efl_tests/test.txt10
2 files changed, 78 insertions, 9 deletions
diff --git a/Scripts/ExactnessStats.sh b/Scripts/ExactnessStats.sh
index 0753fe8..74f3838 100755
--- a/Scripts/ExactnessStats.sh
+++ b/Scripts/ExactnessStats.sh
@@ -4,31 +4,90 @@ RED='\033[0;31m'
4GREEN='\033[0;32m' 4GREEN='\033[0;32m'
5NC='\033[0m' # No Color 5NC='\033[0m' # No Color
6 6
7rm -f /tmp/espion_stats.eet exactness_tests_stats.eet 7ARGS=$(getopt -o t:f:o:x: -l "test:,filter:,output:,exactness:" -n $0 -- "$@");
8espion_stats_format -i -f eet -o exactness_tests_stats.eet 2> /dev/null 8eval set -- "$ARGS";
9 9
10if [ $# -eq 1 ] 10while true; do
11 case "$1" in
12 -o|--output)
13 shift;
14 if [ -n "$1" ]; then
15 OUTPUT_FILE=$1
16 shift;
17 fi
18 ;;
19 -t|--test)
20 shift;
21 if [ -n "$1" ]; then
22 TEST_FILE=$1
23 shift;
24 fi
25 ;;
26 -f|--filter)
27 shift;
28 if [ -n "$1" ]; then
29 only_test=$1
30 shift;
31 fi
32 ;;
33 -x|--exactness)
34 shift;
35 if [ -n "$1" ]; then
36 EXACTNESS_RECORDS_PATH=$1
37 shift;
38 fi
39 ;;
40 --)
41 shift;
42 break;
43 ;;
44 esac
45done
46
47if [ -z "$TEST_FILE" ]
48then
49 echo "Test file required"
50 exit 1
51fi
52
53if [ -z "$OUTPUT_FILE" ]
11then 54then
12 only_test=`echo $1 | tr -d "\"" | tr '[:upper:]' '[:lower:]' | tr "-" " " | tr -s " " "_"` 55 OUTPUT_FILE=espion_stats_out.eet
13fi 56fi
14 57
58#rm -f espion_stats.eet exactness_tests_stats.eet
59#espion_stats_format -i -f eet -o exactness_tests_stats.eet 2> /dev/null
60
61touch $OUTPUT_FILE
62
15IFS=" 63IFS="
16" 64"
17tests_list=`cat ~/e/exactness-elm-data/default-profile/tests.txt | grep -v "#"` 65tests_list=`cat $TEST_FILE | grep -v "#"`
18for test_line in $tests_list 66for test_line in $tests_list
19do 67do
20 REC_NAME=`echo $test_line | sed -n "s/\([^ ]*\) .*/\1/p"` 68 REC_NAME=`echo $test_line | sed -n "s/\([^ ]*\) .*/\1/p"`
69 REC_CMD=`echo $test_line | sed -n "s/[^ ]* \(.*\)/\1/p"`
21 if [ "$only_test" != "" -a "$only_test" != "$REC_NAME" ] 70 if [ "$only_test" != "" -a "$only_test" != "$REC_NAME" ]
22 then 71 then
23 continue 72 continue
24 fi 73 fi
25 74
26 echo "Test $REC_NAME - applying espion stats" 75 echo "Test $REC_NAME - applying espion stats"
27 TEST_SCRIPT="/tmp/auto_test" 76 TEST_SCRIPT="auto_test"
28 77
29 echo "$test_line" > $TEST_SCRIPT 78 echo "$test_line" > $TEST_SCRIPT
30 79
31 exactness -s -b ~/e/exactness-elm-data/default-profile/recordings -w espion_cov $TEST_SCRIPT 2> /dev/null > /dev/null 80 if [ -z "$EXACTNESS_RECORDS_PATH" ]
32 espion_stats_format -f eet -o exactness_tests_stats.eet exactness_tests_stats.eet /tmp/espion_stats.eet 81 then
33 rm -f $TEST_SCRIPT /tmp/espion_stats.eet 82 espion_cov $REC_CMD 2> /dev/null > /dev/null
83 else
84 exactness -s -b $EXACTNESS_RECORDS_PATH -w espion_cov $TEST_SCRIPT 2> /dev/null > /dev/null
85 fi
86 if [ -f $OUTPUT_FILE ]
87 then
88 espion_stats_format -f eet -o $OUTPUT_FILE $OUTPUT_FILE espion_stats.eet
89 else
90 mv espion_stats.eet $OUTPUT_FILE
91 fi
92 rm -f $TEST_SCRIPT espion_stats.eet
34done 93done
diff --git a/efl_tests/test.txt b/efl_tests/test.txt
new file mode 100644
index 0000000..17285ff
--- /dev/null
+++ b/efl_tests/test.txt
@@ -0,0 +1,10 @@
1evas /home/daniel/e/efl/src/tests/evas/.libs/evas_suite
2ecore /home/daniel/e/efl/src/tests/ecore/.libs/ecore_suite
3ecore_con /home/daniel/e/efl/src/tests/ecore_con/.libs/ecore_con_suite
4#ector /home/daniel/e/efl/src/tests/ector/.libs/ector_suite
5edje /home/daniel/e/efl/src/tests/edje/.libs/edje_suite
6#emile /home/daniel/e/efl/src/tests/emile/.libs/emile_suite
7eldbus /home/daniel/e/efl/src/tests/eldbus/.libs/eldbus_suite
8#elocation /home/daniel/e/efl/src/tests/elocation/.libs/elocation_suite
9#emotion /home/daniel/e/efl/src/tests/emotion/.libs/emotion_suite
10#evil /home/daniel/e/efl/src/tests/evil/.libs/evil_suite