This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: speeding up dg-extract-results.sh


On May 24, 2014, at 4:17 AM, Bernd Schmidt <bernds_cb1@t-online.de> wrote:
> On 02/13/2014 10:18 AM, Richard Sandiford wrote:
>> contrib/
>> 	* dg-extract-results.py: New file.
>> 	* dg-extract-results.sh: Use it if the environment seems suitable.
> 
> I'm now seeing the following:
> 
> Traceback (most recent call last):
>  File "../../git/gcc/../contrib/dg-extract-results.py", line 581, in <module>
>    Prog().main()
>  File "../../git/gcc/../contrib/dg-extract-results.py", line 569, in main
>    self.output_tool (self.runs[name])
>  File "../../git/gcc/../contrib/dg-extract-results.py", line 534, in output_tool
>    self.output_variation (tool, variation)
>  File "../../git/gcc/../contrib/dg-extract-results.py", line 483, in output_variation
>    for harness in sorted (variation.harnesses.values()):
> TypeError: unorderable types: HarnessRun() < HarnessRun()
> 
> $ /usr/bin/python --version
> Python 3.3.3

Seems unfortunate…  I’d put in a, if on 3.3 or later, don’t use line until a python person can address it.

Can you try something like the below and see if it works better for you…  If it does, I’d approve it, if you would like to put it in.

Index: dg-extract-results.sh
===================================================================
--- dg-extract-results.sh	(revision 210894)
+++ dg-extract-results.sh	(working copy)
@@ -32,7 +32,7 @@ PROGNAME=dg-extract-results.sh
 PYTHON_VER=`echo "$0" | sed 's/sh$/py/'`
 if test "$PYTHON_VER" != "$0" &&
    test -f "$PYTHON_VER" &&
-   python -c 'import sys; sys.exit (0 if sys.version_info >= (2, 6) else 1)' \
+   python -c 'import sys; sys.exit (0 if sys.version_info >= (2, 6) and sys.version_info < (3, 3) else 1)' \
      > /dev/null 2> /dev/null; then
   exec python $PYTHON_VER "$@"
 fi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]