[dali_2.0.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / build / tizen / rename-cov-data
1 #!/bin/bash
2 COVERAGE_DIR=.cov
3 [[ -d ${COVERAGE_DIR} ]] || mkdir ${COVERAGE_DIR}
4 rm -f ${COVERAGE_DIR}/*
5
6 COVERAGE_EXTENSIONS="
7   gcda
8   gcno
9 "
10
11 SOURCE_EXTENSIONS="
12  c
13  cpp
14 "
15
16 for covExt in $COVERAGE_EXTENSIONS
17 do
18   # Move into .cov directory
19   for file in `find -name *.${covExt}`
20   do
21     cp $file ${COVERAGE_DIR}
22   done
23
24   # strip source extensions liks .cpp as that's the format expected by patch-coverage.pl
25   for srcExt in $SOURCE_EXTENSIONS
26   do
27     for file in `find ${COVERAGE_DIR} -name *.${srcExt}.${covExt}`
28     do
29       name=`echo $file | sed "s/.${srcExt}.${covExt}//g"`
30       mv $file $name.${covExt}
31     done
32   done
33
34 done