Opened 13 years ago

Closed 13 years ago

#7878 closed defect (fixed)

remove any spaces in output of testcc.sh and testcxx.sh

Reported by: David Kirkby Owned by: Georg S. Weber
Priority: major Milestone: sage-4.3.2
Component: build Keywords:
Cc: Merged in: sage-4.3.2.alpha1
Authors: David Kirkby Reviewers: Jaap Spies
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

One of the scripts recently added to sage in ticket #7505 has an extra space in the output when the Sun compiler is used on Solaris. The revised version just used 'sed' to strip out any spaces.

The problem was not see on the testcc.sh, but I thought it prudent to do do both scripts the same.

Attachments (1)

remove-spaces-7878.patch (908 bytes) - added by David Kirkby 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by David Kirkby

Attachment: remove-spaces-7878.patch added

comment:1 Changed 13 years ago by David Kirkby

Status: newneeds_review

comment:2 Changed 13 years ago by David Kirkby

How to test

To test this patch you will need to have Sun Studio installed.

$ local/bin/testcc.sh /opt/sunstudio12.1/bin/cc 
drkirkby@hawk:~/sage-4.3.1.alpha1$ local/bin/testcc.sh /opt/sunstudio12.1/bin/cc 
Sun_Studio
drkirkby@hawk:~/sage-4.3.1.alpha1$ local/bin/testcxx.sh /opt/sunstudio12.1/bin/CC 
Sun_Studio
drkirkby@hawk:~/sage-4.3.1.alpha1$ local/bin/testcxx.sh /opt/sunstudio12.1/bin/CC  | wc 
       1       1      12
drkirkby@hawk:~/sage-4.3.1.alpha1$ local/bin/testcc.sh /opt/sunstudio12.1/bin/cc | wc 
       1       1      11

Note how the current version of testcxx.sh outputs 12 characters, not 11. There is an extra space. With the attached patch, any spaces are removed, so the outputs from the two commands are identical. This is important if one wishes to test that the compilers are the same.

comment:3 Changed 13 years ago by Jaap Spies

Reviewers: Jaap Spies
Status: needs_reviewpositive_review

Before:

jaap@opensolaris:~/Downloads/sage-4.3.2.alpha0$ local/bin/testcc.sh /opt/sunstudio12.1/bin/cc 
Sun_Studio
jaap@opensolaris:~/Downloads/sage-4.3.2.alpha0$ local/bin/testcxx.sh /opt/sunstudio12.1/bin/CC
Sun_Studio 
jaap@opensolaris:~/Downloads/sage-4.3.2.alpha0$ local/bin/testcxx.sh /opt/sunstudio12.1/bin/CC  | wc
      1       1      12
jaap@opensolaris:~/Downloads/sage-4.3.2.alpha0$ local/bin/testcc.sh /opt/sunstudio12.1/bin/cc | wc
      1       1      11

After the patch

jaap@opensolaris:~/Downloads/sage-4.3.2.alpha0$ local/bin/testcxx.sh /opt/sunstudio12.1/bin/CC  | wc
      1       1      11
jaap@opensolaris:~/Downloads/sage-4.3.2.alpha0$ local/bin/testcc.sh /opt/sunstudio12.1/bin/cc | wc 
      1       1      11

Works ok, so positive review

Jaap

comment:4 Changed 13 years ago by Minh Van Nguyen

Merged in: sage-4.3.2.alpha1
Resolution: fixed
Status: positive_reviewclosed

Merged remove-spaces-7878.patch in the base spkg repository. drkirkby: please remember to put the ticket number in your patches. Such information is very useful for tracking down bugs and the ticket in which they were introduced.

Note: See TracTickets for help on using tickets.