ZOSOpenTools / autoconfport

Delta files to build autoconf for z/OS
Apache License 2.0
1 stars 3 forks source link

test case 3 (autom4te cache) fails #2

Closed MikeFultonDev closed 2 years ago

MikeFultonDev commented 2 years ago

testsuite.log has the following:

#                             -*- compilation -*-
3. tools.at:88: testing autom4te cache ...
./tools.at:96: autom4te --language=m4sugar script.4s -o script
./tools.at:101: autom4te --language=m4sugar script.4s -o script
stderr:
m4:script.4s:1: cannot open `foo': EDC5129I No such file or directory.
autom4te: error: /fultonm/m4prod/bin/m4 failed with exit status: 1
./tools.at:101: mv stderr stderr-raw &&
   sed 's/^[^:]*m4[-.ex0-9]*: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
    s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4[-.ex0-9]*: /m4:\1\2 /
    s/: C\(annot open \)\([^`:]*\):/: c\1`\2'\'':/
    s/: include:\( cannot open\)/:\1/
    s/^autom4te: [^ ]*m4[.ex]* /autom4te: m4 /
    s/^autom4te: error: [^ ]*m4[.ex]* /autom4te: error: m4 /
    s!^.*/\([^/][^/]*\)\.m4: *[0-9][0-9]*: *!\1.m4: !
    s!^.*/\([^/][^/]*\)\.m4: *[0-9][0-9]*: *[0-9][0-9]*: *!\1.m4: !
    s/ (E[A-Z]*)$//
    ' stderr-raw >&2
1c1
< m4:script.4s:1: cannot open `foo': No such file or directory
---
> m4:script.4s:1: cannot open `foo': EDC5129I No such file or directory.
3. tools.at:88: 3. autom4te cache (tools.at:88): FAILED (tools.at:101)
4

The difference is the 'EDC5129I' error message prefix being added to the error output.

MikeFultonDev commented 2 years ago

The macro with the sed incantation is in tests/local.at:

m4_define([AT_CHECK_M4],
[AT_CHECK([$1], [$2], [$3],
          m4_case([$4], [], [], [ignore], [ignore], [stderr]))
m4_case([$4], [], [], [ignore], [],
[AT_CHECK([[mv stderr stderr-raw &&
   sed 's/^[^:]*m4[-.ex0-9]*: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
        s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4[-.ex0-9]*: /m4:\1\2 /
        s/: C\(annot open \)\([^`:]*\):/: c\1`\2'\'':/
        s/: include:\( cannot open\)/:\1/
        s/^autom4te: [^ ]*m4[.ex]* /autom4te: m4 /
        s/^autom4te: error: [^ ]*m4[.ex]* /autom4te: error: m4 /
        s!^.*/\([^/][^/]*\)\.m4: *[0-9][0-9]*: *!\1.m4: !
        s!^.*/\([^/][^/]*\)\.m4: *[0-9][0-9]*: *[0-9][0-9]*: *!\1.m4: !
        s/ (E[A-Z]*)$//
    ' stderr-raw >&2]], [0], [], [$4])])
])
MikeFultonDev commented 2 years ago

To get any changes into 'testsuite', you need to re-create testsuite, e.g. rm tests/testsuite make tests/testsuite

You can then re-run the one test with: testsuite 3

MikeFultonDev commented 2 years ago

Need to add one more substitution to remove the period at the end of the line:

s/\(.*\)\(EDC5129I \)\(No such file or directory\)\.$/\1\3/