* [Test] contrib/test_installed modified to set specific gcov
@ 2012-08-08 12:47 Anna Tikhonova
2012-08-10 10:03 ` Anna Tikhonova
0 siblings, 1 reply; 4+ messages in thread
From: Anna Tikhonova @ 2012-08-08 12:47 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
Hi,
while running check for Android NDK compiler (I've used
contrib/test_installed for it) I've noticed that gcov name is
hardcoded in g++.dg/gcov/gcov.exp.
All NDK x86 tools have prefix like i686-linux-android-, so testing
will fail to spawn gcov.
The patch attached introduces --with-gcov flag of
contrib/test_installed so one could set specific gcov for testing.
As workaround we could create a wrapper script named 'gcov' pointing
to specific gcov in directory where GCC_UNDER_TEST resides.
What do you think of this patch? Do you find it usefull? Thanks in advance.
Anna
[-- Attachment #2: gcov.p --]
[-- Type: application/octet-stream, Size: 2260 bytes --]
Index: gcc/testsuite/g++.dg/gcov/gcov.exp
===================================================================
--- gcc/testsuite/g++.dg/gcov/gcov.exp (revision 187587)
+++ gcc/testsuite/g++.dg/gcov/gcov.exp (working copy)
@@ -21,12 +21,16 @@
load_lib gcov.exp
global GXX_UNDER_TEST
-
-# Find gcov in the same directory as $GXX_UNDER_TEST.
-if { ![is_remote host] && [string match "*/*" [lindex $GXX_UNDER_TEST 0]] } {
- set GCOV [file dirname [lindex $GXX_UNDER_TEST 0]]/gcov
+global GCOV_UNDER_TEST
+if { $GCOV_UNDER_TEST != "" } {
+ set GCOV $GCOV_UNDER_TEST
} else {
- set GCOV gcov
+ # Find gcov in the same directory as $GXX_UNDER_TEST.
+ if { ![is_remote host] && [string match "*/*" [lindex $GXX_UNDER_TEST 0]] } {
+ set GCOV [file dirname [lindex $GXX_UNDER_TEST 0]]/gcov
+ } else {
+ set GCOV gcov
+ }
}
# Initialize harness.
Index: contrib/test_installed
===================================================================
--- contrib/test_installed (revision 187587)
+++ contrib/test_installed (working copy)
@@ -48,6 +48,7 @@
--srcdir=*) srcdir=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--prefix=*) prefix=`echo "$1" | sed 's/[^=]*=//'`; shift;;
+ --with-gcov=*) GCOV_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--with-gcc=*) GCC_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--with-g++=*) GXX_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
--with-gfortran=*) GFORTRAN_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
@@ -72,6 +73,7 @@
[deduced from shell-script pathname]
--prefix=/some/dir use gcc, g++ and gfortran from /some/dir/bin [PATH]
+--with-gcov=/some/dir/bin/gcov use specified gcov program [gcov]
--with-gcc=/some/dir/bin/gcc use specified gcc program [gcc]
--with-g++=/some/dir/bin/g++ use specified g++ program [g++]
--with-gfortran=/some/dir/bin/gfortran use specified gfortran program [gfortran]
@@ -106,6 +108,7 @@
set tmpdir "${tmpdir-`${PWDCMD-pwd}`}"
set srcdir "${testsuite-${srcdir}/gcc/testsuite}"
set CFLAGS ""
+set GCOV_UNDER_TEST "${GCOV_UNDER_TEST}"
set CXXFLAGS ""
set GCC_UNDER_TEST "${GCC_UNDER_TEST-${prefix}${prefix+/bin/}gcc}"
set GXX_UNDER_TEST "${GXX_UNDER_TEST-${prefix}${prefix+/bin/}g++}"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Test] contrib/test_installed modified to set specific gcov
2012-08-08 12:47 [Test] contrib/test_installed modified to set specific gcov Anna Tikhonova
@ 2012-08-10 10:03 ` Anna Tikhonova
2012-08-17 11:25 ` Anna Tikhonova
0 siblings, 1 reply; 4+ messages in thread
From: Anna Tikhonova @ 2012-08-10 10:03 UTC (permalink / raw)
To: gcc-patches
Ping.
2012/8/8 Anna Tikhonova <anna.m.tikhonova@gmail.com>:
> Hi,
>
> while running check for Android NDK compiler (I've used
> contrib/test_installed for it) I've noticed that gcov name is
> hardcoded in g++.dg/gcov/gcov.exp.
> All NDK x86 tools have prefix like i686-linux-android-, so testing
> will fail to spawn gcov.
>
> The patch attached introduces --with-gcov flag of
> contrib/test_installed so one could set specific gcov for testing.
> As workaround we could create a wrapper script named 'gcov' pointing
> to specific gcov in directory where GCC_UNDER_TEST resides.
>
> What do you think of this patch? Do you find it usefull? Thanks in advance.
>
> Anna
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Test] contrib/test_installed modified to set specific gcov
2012-08-10 10:03 ` Anna Tikhonova
@ 2012-08-17 11:25 ` Anna Tikhonova
2012-09-05 11:45 ` Anna Tikhonova
0 siblings, 1 reply; 4+ messages in thread
From: Anna Tikhonova @ 2012-08-17 11:25 UTC (permalink / raw)
To: gcc-patches; +Cc: janisjo
Ping one more time.
2012/8/10 Anna Tikhonova <anna.m.tikhonova@gmail.com>:
> Ping.
>
> 2012/8/8 Anna Tikhonova <anna.m.tikhonova@gmail.com>:
>> Hi,
>>
>> while running check for Android NDK compiler (I've used
>> contrib/test_installed for it) I've noticed that gcov name is
>> hardcoded in g++.dg/gcov/gcov.exp.
>> All NDK x86 tools have prefix like i686-linux-android-, so testing
>> will fail to spawn gcov.
>>
>> The patch attached introduces --with-gcov flag of
>> contrib/test_installed so one could set specific gcov for testing.
>> As workaround we could create a wrapper script named 'gcov' pointing
>> to specific gcov in directory where GCC_UNDER_TEST resides.
>>
>> What do you think of this patch? Do you find it usefull? Thanks in advance.
>>
>> Anna
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Test] contrib/test_installed modified to set specific gcov
2012-08-17 11:25 ` Anna Tikhonova
@ 2012-09-05 11:45 ` Anna Tikhonova
0 siblings, 0 replies; 4+ messages in thread
From: Anna Tikhonova @ 2012-09-05 11:45 UTC (permalink / raw)
To: gcc-patches; +Cc: janisjo, mikestump, ro, hjl.tools, kirill.yukhin
Ok for trunk, 4.7, 4.6?
2012/8/17 Anna Tikhonova <anna.m.tikhonova@gmail.com>:
> Ping one more time.
>
> 2012/8/10 Anna Tikhonova <anna.m.tikhonova@gmail.com>:
>> Ping.
>>
>> 2012/8/8 Anna Tikhonova <anna.m.tikhonova@gmail.com>:
>>> Hi,
>>>
>>> while running check for Android NDK compiler (I've used
>>> contrib/test_installed for it) I've noticed that gcov name is
>>> hardcoded in g++.dg/gcov/gcov.exp.
>>> All NDK x86 tools have prefix like i686-linux-android-, so testing
>>> will fail to spawn gcov.
>>>
>>> The patch attached introduces --with-gcov flag of
>>> contrib/test_installed so one could set specific gcov for testing.
>>> As workaround we could create a wrapper script named 'gcov' pointing
>>> to specific gcov in directory where GCC_UNDER_TEST resides.
>>>
>>> What do you think of this patch? Do you find it usefull? Thanks in advance.
>>>
>>> Anna
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-05 11:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-08 12:47 [Test] contrib/test_installed modified to set specific gcov Anna Tikhonova
2012-08-10 10:03 ` Anna Tikhonova
2012-08-17 11:25 ` Anna Tikhonova
2012-09-05 11:45 ` Anna Tikhonova
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).