bugPSPP - Bugs: bug #59859, tex tests using `wc` on mac

 
 

bug #59859: tex tests using `wc` on mac

Submitter:  Jeremy Lavergne <snc>
Submitted:  Tue 12 Jan 2021 04:47:41 AM UTC
   
 
Category:  Compilation/Portability Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 28 Aug 2021 09:12:56 AM UTC, comment #3: 

I have reimplemented these tests so that they avoid the use of wc altogether.

John Darrington <jmd>
Group administrator
Tue 12 Jan 2021 09:02:05 PM UTC, comment #2: 

Fritz, thanks for exploring options already.

I'll ensure gwc is made available during tests.

Jeremy Lavergne <snc>
Tue 12 Jan 2021 07:13:18 AM UTC, comment #1: 

Hi Jeremy,

i noticed this problem some time ago and added a patch to pspp that it uses gwc if it is available.

https://git.savannah.gnu.org/cgit/pspp.git/commit/?id=623da5b3ee66c4923679261fa72884d05212225a

I spent some (short) time to find a different way to get "wc -L" on MacOS but without success.

Fritz


Friedrich Beckmann <beckmanf>
Group Member
Tue 12 Jan 2021 04:47:41 AM UTC, original submission:  

The `wc` natively available on MacOS does not support `-L`.

One workaround for Mac is to add coreutils (which provides gwc) to dependencies, however I'm curious if this is worth a revisit on the PSPP side of things.


1227. tex.at:200: testing tex another example ...                                                                                      
./tex.at:202: pspp -O format=tex $abs_top_srcdir/examples/regress.sps                                                                  
./tex.at:203: test $($GWC -L pspp.tex | awk '{print $1}') -le 80                                                                       
--- /dev/null   2021-01-11 23:36:17.000000000 -0500                                                                                    
+++ /opt/local/var/macports/build/_Users_aeetes_macports-ports_math_pspp-devel/pspp-devel/work/pspp-1.5.2-g188de2/tests/testsuite.dir/at
-groups/1227/stderr     2021-01-11 23:36:45.000000000 -0500                                                                            
@@ -0,0 +1,3 @@                                                                                                                        
+wc: illegal option -- L                                                                                                               
+usage: wc [-clmw] [file ...]                                                                                                          
+/opt/local/var/macports/build/_Users_aeetes_macports-ports_math_pspp-devel/pspp-devel/work/pspp-1.5.2-g188de2/tests/testsuite.dir/at-gr
oups/1227/test-source: line 25: test: -le: unary operator expected                                                                     
stdout:                                                                                                                                
./tex.at:203: exit code was 2, expected 0                                                                                              
1227. tex.at:200:  FAILED (tex.at:203)                                                                                                 

Jeremy Lavergne <snc>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by beckmanf (Posted a comment)
  • -email is unavailable- added by snc (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-08-28 jmd StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2021-01-12 beckmanf StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code