automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what's a good way to check a file size (as part of a "make check") f


From: Alexandre Duret-Lutz
Subject: Re: what's a good way to check a file size (as part of a "make check") from automake?
Date: Mon, 26 Dec 2005 23:11:40 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

>>> "EH" == Ed Hartnett <address@hidden> writes:

 EH> Should we just use 'ls -l $file' with sed to parse the output for the
 EH> file size? 

Depending on how portable you want to be, getting the size out of ls -l
will not be as easy as it seems: see the comments in mdate-sh.

 EH> If so, do we have to check for the existence of ls and sed during the
 EH> configure? Or is going to be found everywhere?

You can assume them.  (configure wouldn't work if they didn't exist.)

 EH> Or is there some more clever way to check the size of a file?

Sorry for not answering this question (I don't know the answer),
but why test only the size ?  Isn't the contents important too ?
If the file isn't too big I'd ship the expected result and
compare it with `cmp'.  If it's too big you can still compute a
checksum to compare.
-- 
Alexandre Duret-Lutz

Shared books are happy books.     http://www.bookcrossing.com/friend/gadl





reply via email to

[Prev in Thread] Current Thread [Next in Thread]