patchGNU Autoconf Archive - Patches: patch #8492, New: autotest...

 
 

patch #8492: New: autotest AX_AT_CHECK_PATTERN() and AX_AT_DIFF_PATTERN()

Submitter:  Luke Mewburn <lukemewburn>
Submitted:  Wed 02 Jul 2014 11:08:10 PM UTC
   
 
Priority:  5 - Normal Status:  Done
Assigned to:  simons Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 21 Oct 2014 12:09:18 PM UTC, comment #3: 

Hi Luke, the quickest way to get those updates included into the archive is create a pull request for the repository <https://github.com/peti/autoconf-archive>. Then I can just press a "merge" button to get them included. :-)

I can also fetch updates from another Git repository or commit them manually from an attachment to the Patch Tracker at Savannah, but this is slightly more effort and thus tends to take longer.

If you prefer to go the ticket route, then please create a new ticket. Attaching new macros, updates, etc. to an existing ticket is fine as long as the ticket is marked "open". This particular ticket, for instance, was closed a while ago, so there's no guarantee that changes made here won't be lost.

I hope this helps!

Best regards,
Peter

Peter Simons <simons>
Group administrator
Tue 21 Oct 2014 11:23:00 AM UTC, comment #2: 

I've released a new version of the macros at:
  https://github.com/lukem/ax_at_check_pattern
tagged as release/4

This includes:

  • Provide AX_AT_DATA_CHECK_PATTERN_AWK() to write an awk script containing the diff post-processor to a file.
  • Add README.
  • Improve quoting and use quadrigraphs.
  • Add references to github.
  • Extend testsuite for AX_AT_DATA_CHECK_PATTERN_AWK() and quoting fixes.


(The fourth bullet addresses Peter's suggestion on 15 Oct 2014).

What's the best way to get the macro updated:
a) Attach the latest to this ticket (serial 4)
b) Submit a new ticket
c) Let a maintainer just grab it from github directly
?

Luke Mewburn <lukemewburn>
Wed 15 Oct 2014 08:28:21 AM UTC, comment #1: 

I added your macro in commit 5b217d3. I'm not quite sure what to do about the test suite. The Autoconf Archive has no mechanism to distribute that kind of auxiliary information. I've added references to this issue so that people have a chance to find your work here. It might be a good idea to extend the macro's documentation to mention the test suite explicitly, too.

Peter Simons <simons>
Group administrator
Wed 02 Jul 2014 11:08:10 PM UTC, original submission:  

I've implemented two macros for autotest:

AX_AT_CHECK_PATTERN(COMMANDS, [STATUS], [STDOUT-RE], [STDERR-RE], [RUN-IF-FAIL], [RUN-IF-PASS])

AX_AT_DIFF_PATTERN(PATTERN-FILE, TEST-FILE, [STATUS=0], [DIFFERENCES])


AX_AT_CHECK_PATTERN() executes a test similar to AT_CHECK(), except
that stdout and stderr are awk regular expressions (REs).

NOTE: as autoconf uses [] for quoting, the use of [brackets] in the RE
arguments STDOUT-RE and STDERR-RE can be awkward and require careful
extra quoting, or quadrigraphs '@<:@' (for '[') and '@:>@' (for ']').

awk is invoked via $AWK, which defaults to "awk" if unset or empty.

Implemented using AT_CHECK() with a custom value for $at_diff that
invokes diff with an awk post-processor.


AX_AT_DIFF_PATTERN() checks that the PATTERN-FILE applies to TEST-FILE.
If there are differences, STATUS will be 1 and they should be DIFFERENCES.


I provide both the m4 source as well as a distribution tarball which contains a testsuite as well.
The testsuite has some examples how to use the macros.
The testsuite could be incorporated into any existing autoconf-archive testsuite.


Luke.

Luke Mewburn <lukemewburn>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #31668:  ax_at_check_pattern.m4 added by lukemewburn (3KiB - application/octet-stream - macro file, distribution archive.)
file #31669:  ax_at_check_pattern-3.tar.gz added by lukemewburn (74KiB - application/x-gzip - macro file, distribution archive.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by simons (Posted a comment)
  • -email is unavailable- added by lukemewburn (Submitted the item)
  •  

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-10-16 simons StatusReady For Test Done
        Open/ClosedOpen Closed
    2014-10-15 simons StatusNone Ready For Test
        Assigned toNone simons
    2014-07-02 lukemewburn Attached File- Added ax_at_check_pattern.m4, #31668
        Attached File- Added ax_at_check_pattern-3.tar.gz, #31669

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code