-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Provide Autoconf Testsuite syntax for NIST tests #83
base: gcos4gnucobol-3.x
Are you sure you want to change the base?
[WIP] Provide Autoconf Testsuite syntax for NIST tests #83
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general idea is good and the approach quite well.
Things to do:
- rename folder "testsuite.src" to "nistrun.src"
- Makefile.am:
- add the new testsuite for generation and distribution, see how it is done for the testuite one directory above
- new target check-nist, with dependencies
nistrun $(MODULES_ALL)
(this will ensure that both the generated testsuite source and the unpacked source files are ready)
-
either add run_DBNOIX.at and friend and make the complete include conditional depending on the "with_db" variable or - preferably -check the differences and add the appropriateAT_SKIP_IF
for the tests to skip - testsuite source files:
-
change the complete testsuite to notcp
anything, but compile from those directories - drop the group from the
AT_SETUP
as we have that inAT_KEYWORDS
- drop the
-x -debug
fromAT_CHECK
- they are already part of$COMPILE
- add check of stdout and stderr to the compiles, should be completely empty - for some of the early tests add the appropriate
-Wno-goto-section-stuff
to theCOMPILE
- actual checking for the expected results (mostly from generated report output, in some places from stdout/stderr) -> see report.pl
-
This way the general test running should be fine (one test is special as it needs to be killed, just skip it for now), but the important part is the verification (report.pl does some tests, mostly on the generated reports) - I guess that will lead to more AT_CHECK
using $GREP
/$SED
/$AWK
, right?
I don't think I will have time to do all these changes for a full integration in GnuCOBOL in the short term. My short term plan was more to merge this into the Anyway, I will try to see what I can do on the short term.
Actually, I still get a lot of warnings. I pushed a version where the warnings are present, even with options |
Also, I am not sure of what you mean by removing the |
Pass their directories to cobc instead of cp and then compile locally.
|
Sounds good, I can have a look when you consider you are as fast as possible.
I now remember that the obsolete warnings are even part of some tests.
Note for the pull requests that we already can run `make test --jobs=4` to run the modules in parallel and can do the same for make checkall.
|
a16fece
to
e8b9748
Compare
I have created an issue to keep track of this discussion. This week-end, I am going to merge this PR in the branch |
I'd suggest to not merge that yet... Running it that way does miss the actual checking of the test results (you only get "does it compile and run"). |
tests/cobol85/nistrun.src/run_SM.at
Outdated
# promoted on 2023-02-04T15:44 | ||
AT_KEYWORDS([SM]) | ||
AT_CHECK([cp -f ${abs_builddir}/cobol85/SM/SM208A.CBL .], [0], [], []) | ||
AT_CHECK([$COMPILE -std=cobol85 -I ${abs_builddir}/cobol85/copy SM208A.CBL], [0], [], [SM208A.CBL: in section 'SECT-SM208A-001': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this warning is not tested in the NIST testsuite - disable it with -Wno-goto-different-section
(for all tests).
tests/cobol85/nistrun.src/run_SM.at
Outdated
AT_SETUP([SM208A]) | ||
# promoted on 2023-02-04T15:44 | ||
AT_KEYWORDS([SM]) | ||
AT_CHECK([cp -f ${abs_builddir}/cobol85/SM/SM208A.CBL .], [0], [], []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better:
-AT_CHECK([cp -f ${abs_builddir}/cobol85/SM/SM208A.CBL .], [0], [], [])
-AT_CHECK([$COMPILE -std=cobol85 -I ${abs_builddir}/cobol85/copy SM208A.CBL], [0], [], [SM208A.CBL: in section 'SECT-SM208A-001':
+AT_CHECK([$COMPILE -std=cobol85 -Wno-goto-different-section -I ${abs_builddir}/cobol85/copy ${abs_builddir}/cobol85/SM/SM208A.CBL], [0], [], [])
But I'd actually suggest to at least define an additional COMPILE85
as $COMPILE -std=cobol85 -I ${abs_builddir}/cobol85/copy
- or even a macro so one could use
NIST_COMPILE([SM208A])
I am not in a hurry, I am happy with the status of
I don't understand what you mean: the AT_CHECK actually also check the stdout/stderr. Or do you mean that we should also check generated files ? It's not clear from the
Of course, I could keep that as an alias, but I don't like having two different testsuites with two completely different ways of running tests. At the end, when a test fails, it is not clear in which environment it was run. It's a bit of a theoretical problem, as I have not really encountered a case where I would be stuck. Anyway, you know what it is, I wrote a tool, now I want to use it for everything... |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## gcos4gnucobol-3.x #83 +/- ##
==================================================
Coverage 65.27% 65.27%
==================================================
Files 31 31
Lines 56542 56542
Branches 14767 14767
==================================================
Hits 36908 36908
Misses 13828 13828
Partials 5806 5806
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The tests have the expectations in text form, report.pl has that already in code and checks the resulting report.log (in rare cases something else, like stdout/stderr). Those checks would have to be placed in AT_CHECK, too (they are actually the core of the tests, and this is currently missing). |
If I understand correctly, every test |
yes
no the .log is not to be compared but to be inspected. report.pl does this from the perl side and writes the results to a summary file (along with a duration.log) per module. Then finally the summary.pl file reads those module files to write a summary file, which is then compared to the summary/summarynoix in the end. The summary.pl is mostly useful for a quick validation/telling, it doesn't need to be inspected for this PR. But the report log files are to be inspected after each test run. Note: dropping the |
I would prefer not because using inplace files may cause the compiler to generate warnings/errors with the absolute position of the file, and it will be different for different users, so the Copying is a bit more expensive, but it makes all the errors local. Also, when debugging a failure, having the COBOL source in the test directory makes it easier to inspect all the files. |
cac0406
to
612e832
Compare
This new version checks the I still have two weird results:
|
I'd suggest to debug those :-) I'm definitely keen to know where those come from. Additional notes:
|
75f6072
to
62148cd
Compare
I couldn't find a way to do that. It looks like the only way to configure globally the testsuite is to add this in |
62148cd
to
b3f863e
Compare
Using this suite, it is possible to parallelize its evaluation (for example with `autofonce run -t nist` with v0.7)
b3f863e
to
7b9eadf
Compare
My guess is that the solution would be to keep |
Oh, it is. atlocal is sourced, so we have the full running environment in there if test "$(basename "$0")" = "nistrun"; then
export COB_DISABLE_WARNINGS=Y
export COB_SWITCH_1=ON
export COB_SWITCH_2=OFF
export COMPILE85="$COMPILE -std=cobol85 -Wno-goto-different-section -Wno-goto-section -I copy"
export COMPILE_MODULE85="$COMPILE_MODULE -std=cobol85 -Wno-goto-different-section -Wno-goto-section -I copy"
export GREP="$GREP --text"
fi I think that the first three likely would be better set directly in the specific tests that need those: AT_CHECK([COB_SWITCH_1=ON COB_SWITCH_2=OFF \
$COBCRUN_DIRECT ./RW101A], [0], [], []) note: please add the |
Using this suite, it is possible to parallelize its evaluation (for example with
autofonce run -t tests/cobol85/nist.at
)