diff mbox

[03/10] libstdc++v3: Explicitly disable carets and colorization within testsuite

Message ID 1445632918-29617-4-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm Oct. 23, 2015, 8:41 p.m. UTC
Later on in this patch kit, with token range underlining, the
libstdc++v3 testsuite starts showing numerous failures of the form:

  FAIL: 17_intro/using_namespace_std_tr1_neg.cc (test for excess errors)

The excess errors turn out to be the source code and
caret/underlines emitted after an "error":

  using namespace std::tr1;  // { dg-error "is not a namespace-name" }
                  ^~~

However, looking at the results of a control build of r228618, I see
the testsuite emit code and carets (albeit without underlines):

  using namespace std::tr1;  // { dg-error "is not a namespace-name" }
                  ^

and for some reason this is treated by dg.exp as:

  PASS: 17_intro/using_namespace_std_tr1_neg.cc (test for excess errors)

It's not clear to me why the status quo isn't treating the lines of
dumped source code and caret as "excess errors", but the attached
patch explicitly disables carets and colorization.

libstdc++-v3/ChangeLog:
	* testsuite/lib/libstdc++.exp (v3_target_compile): Add
	-fno-diagnostics-show-caret -fdiagnostics-color=never to
	option's additional_flags.
---
 libstdc++-v3/testsuite/lib/libstdc++.exp | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jeff Law Oct. 23, 2015, 9:07 p.m. UTC | #1
On 10/23/2015 02:41 PM, David Malcolm wrote:
> Later on in this patch kit, with token range underlining, the
> libstdc++v3 testsuite starts showing numerous failures of the form:
>
>    FAIL: 17_intro/using_namespace_std_tr1_neg.cc (test for excess errors)
>
> The excess errors turn out to be the source code and
> caret/underlines emitted after an "error":
>
>    using namespace std::tr1;  // { dg-error "is not a namespace-name" }
>                    ^~~
>
> However, looking at the results of a control build of r228618, I see
> the testsuite emit code and carets (albeit without underlines):
>
>    using namespace std::tr1;  // { dg-error "is not a namespace-name" }
>                    ^
>
> and for some reason this is treated by dg.exp as:
>
>    PASS: 17_intro/using_namespace_std_tr1_neg.cc (test for excess errors)
>
> It's not clear to me why the status quo isn't treating the lines of
> dumped source code and caret as "excess errors", but the attached
> patch explicitly disables carets and colorization.
>
> libstdc++-v3/ChangeLog:
> 	* testsuite/lib/libstdc++.exp (v3_target_compile): Add
> 	-fno-diagnostics-show-caret -fdiagnostics-color=never to
> 	option's additional_flags.
I'd feel better knowing what was going on with the testing framework. 
But I can live with this.
jeff
diff mbox

Patch

diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 88738b7..ac3654b 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -462,6 +462,8 @@  proc v3_target_compile { source dest type options } {
     global STATIC_LIBCXXFLAGS
     global tool
 
+    lappend options "additional_flags=-fno-diagnostics-show-caret -fdiagnostics-color=never"
+
     if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
         lappend options "libs=${gluefile}"
         lappend options "ldflags=${wrap_flags}"