* Re: [pph] Fix executable test detection (issue4635087)
@ 2011-07-02 0:56 gchare
0 siblings, 0 replies; 3+ messages in thread
From: gchare @ 2011-07-02 0:56 UTC (permalink / raw)
To: crowl, dnovillo; +Cc: gcc-patches, reply
I should add that this exposed two assembly comparison failures which
slipped in a previous check-in when this problem was still up.
Namely:
FAIL: g++.dg/pph/x1dynarray0.cc (assembly comparison)
FAIL: g++.dg/pph/x1dynarray1.cc (assembly comparison)
Lawrence is reorganizing those tests as we speak and told me not to
bother marking them as `pph asm xdiff` as part of this check-in.
http://codereview.appspot.com/4635087/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pph] Fix executable test detection (issue4635087)
2011-07-02 0:45 Gabriel Charette
@ 2011-07-02 0:47 ` Lawrence Crowl
0 siblings, 0 replies; 3+ messages in thread
From: Lawrence Crowl @ 2011-07-02 0:47 UTC (permalink / raw)
To: Gabriel Charette; +Cc: reply, dnovillo, gcc-patches
LGTM
On 7/1/11, Gabriel Charette <gchare@google.com> wrote:
> [string compare "dg-do-what" "run"] which was used before would always
> return true.
>
> Thus the tests would no longer even get to the asm diff section...
>
> Me and Lawrence tried to find a way to get the content of the "dg-do-what"
> variable, but couldn't.
>
> We decided to revert to this quick hack fix for now (better then not running
> the asm diffs...)
>
> (I also added an unrelated re-ordering to the order of the pph asm xdiff
> comment in c1varoder.cc)
>
> 2011-07-01 Gabriel Charette <gchare@google.com>
>
> * g++.dg/pph/c1varorder.cc: Moved pph asm xdiff comment to top.
> * lib/dg-pph.exp (proc): Fixed executable test detection.
>
> diff --git a/gcc/testsuite/g++.dg/pph/c1varorder.cc
> b/gcc/testsuite/g++.dg/pph/c1varorder.cc
> index 2db8209..a7a65ec 100644
> --- a/gcc/testsuite/g++.dg/pph/c1varorder.cc
> +++ b/gcc/testsuite/g++.dg/pph/c1varorder.cc
> @@ -1,6 +1,7 @@
> -#include "c1varorder.h"
> // pph asm xdiff
>
> +#include "c1varorder.h"
> +
> int foo(void)
> {
> return var1 - var2;
> diff --git a/gcc/testsuite/lib/dg-pph.exp b/gcc/testsuite/lib/dg-pph.exp
> index b701ce2..e34bd63 100644
> --- a/gcc/testsuite/lib/dg-pph.exp
> +++ b/gcc/testsuite/lib/dg-pph.exp
> @@ -74,8 +74,11 @@ proc dg-pph-pos { subdir test options mapflag suffix } {
> set dg-do-what-default compile
> dg-test -keep-output $test "$options -I." ""
>
> + # Determine whether this is an executable test
> + set is_exec [llength [grep $test "dg-do run"]]
> +
> # Executables do not generate assembly.
> - if { ![string compare "dg-do-what" "run"] } {
> + if { !$is_exec } {
> # Not executable, so quit if it did not compile successfully.
> if { ![file_on_host exists "$bname.s"] } {
> fail "$nshort $options (regular assembly missing)"
> @@ -93,7 +96,7 @@ proc dg-pph-pos { subdir test options mapflag suffix } {
> dg-test -keep-output $test "$options $mapflag -I." ""
>
> # Executables do not generate assembly,
> - if { [string compare "dg-do-what" "run"] } {
> + if { $is_exec } {
> # and so we are done testing.
> return
> }
>
> --
> This patch is available for review at http://codereview.appspot.com/4635087
>
--
Lawrence Crowl
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pph] Fix executable test detection (issue4635087)
@ 2011-07-02 0:45 Gabriel Charette
2011-07-02 0:47 ` Lawrence Crowl
0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Charette @ 2011-07-02 0:45 UTC (permalink / raw)
To: reply, crowl, dnovillo, gcc-patches
[string compare "dg-do-what" "run"] which was used before would always return true.
Thus the tests would no longer even get to the asm diff section...
Me and Lawrence tried to find a way to get the content of the "dg-do-what" variable, but couldn't.
We decided to revert to this quick hack fix for now (better then not running the asm diffs...)
(I also added an unrelated re-ordering to the order of the pph asm xdiff comment in c1varoder.cc)
2011-07-01 Gabriel Charette <gchare@google.com>
* g++.dg/pph/c1varorder.cc: Moved pph asm xdiff comment to top.
* lib/dg-pph.exp (proc): Fixed executable test detection.
diff --git a/gcc/testsuite/g++.dg/pph/c1varorder.cc b/gcc/testsuite/g++.dg/pph/c1varorder.cc
index 2db8209..a7a65ec 100644
--- a/gcc/testsuite/g++.dg/pph/c1varorder.cc
+++ b/gcc/testsuite/g++.dg/pph/c1varorder.cc
@@ -1,6 +1,7 @@
-#include "c1varorder.h"
// pph asm xdiff
+#include "c1varorder.h"
+
int foo(void)
{
return var1 - var2;
diff --git a/gcc/testsuite/lib/dg-pph.exp b/gcc/testsuite/lib/dg-pph.exp
index b701ce2..e34bd63 100644
--- a/gcc/testsuite/lib/dg-pph.exp
+++ b/gcc/testsuite/lib/dg-pph.exp
@@ -74,8 +74,11 @@ proc dg-pph-pos { subdir test options mapflag suffix } {
set dg-do-what-default compile
dg-test -keep-output $test "$options -I." ""
+ # Determine whether this is an executable test
+ set is_exec [llength [grep $test "dg-do run"]]
+
# Executables do not generate assembly.
- if { ![string compare "dg-do-what" "run"] } {
+ if { !$is_exec } {
# Not executable, so quit if it did not compile successfully.
if { ![file_on_host exists "$bname.s"] } {
fail "$nshort $options (regular assembly missing)"
@@ -93,7 +96,7 @@ proc dg-pph-pos { subdir test options mapflag suffix } {
dg-test -keep-output $test "$options $mapflag -I." ""
# Executables do not generate assembly,
- if { [string compare "dg-do-what" "run"] } {
+ if { $is_exec } {
# and so we are done testing.
return
}
--
This patch is available for review at http://codereview.appspot.com/4635087
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-02 0:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-02 0:56 [pph] Fix executable test detection (issue4635087) gchare
-- strict thread matches above, loose matches on Subject: below --
2011-07-02 0:45 Gabriel Charette
2011-07-02 0:47 ` Lawrence Crowl
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).