From: Naresh Kamboju <[email protected]>

enabling gcov and running tests with gcov need this patches
these patches copy gcov support source/binary/gcno/gcda/gcov in to
${LTPROOT}/testcases/bin/

gcov need source/binary and gcov supported file gcno and gcda to be
present in the same directory to generate gcov files.

 - apply copy gcov supported files
 - runltp with gcov enable
 - make autotools
 - ./configure CFLAGS="-Wall -fprofile-arcs -ftest-coverage -g" \
     LDFLAGS="-lgcov -fprofile-arcs" --prefix=`pwd`
 - make all
 - make install
 - ./runltp
 - lcov --capture --directory ./ --output-file ltp-full-coverage.info
 - genhtml ltp-full-coverage.info --output-directory ltp-full-test-coverage-out

Signed-off-by: Naresh Kamboju <[email protected]>
---
 copy_gcda_files.sh          |    7 +++++++
 copy_source_n_gcon_files.sh |   12 ++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 copy_gcda_files.sh
 create mode 100644 copy_source_n_gcon_files.sh

diff --git a/copy_gcda_files.sh b/copy_gcda_files.sh
new file mode 100644
index 0000000..6974694
--- /dev/null
+++ b/copy_gcda_files.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+find $2 -regex '.*\.\(gcda\)$' -print  > /tmp/gcda_file_list
+for file in `cat /tmp/gcda_file_list` 
+do 
+       cp -f $file $1 
+done
diff --git a/copy_source_n_gcon_files.sh b/copy_source_n_gcon_files.sh
new file mode 100644
index 0000000..9f2fb6a
--- /dev/null
+++ b/copy_source_n_gcon_files.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+find $2 -regex '.*\.\(c\|cpp\|h\)$' -print  > /tmp/c_h_file_list
+for c_h_file in `cat /tmp/c_h_file_list` 
+do 
+       cp -f $c_h_file $1
+done
+
+find $2 -regex '.*\.\(gcno\)$' -print  > /tmp/gcno_file_list
+for file in `cat /tmp/gcno_file_list` 
+do 
+       cp -f $file $1
+done
-- 
1.7.9.5


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to