Browse Source

Ensure that PR42399 regression test produces results

dejagnu-1.6.3
Jacob Bachmeyer 5 years ago
parent
commit
dbd4a5a3b7
  1. 16
      ChangeLog
  2. 3
      testsuite/runtest.main/nested/testsuite/bug.test/pr42399-sub.exp
  3. 10
      testsuite/runtest.main/pr42399.exp

16
ChangeLog

@ -1,22 +1,28 @@
2021-05-20 Jacob Bachmeyer <jcb@gnu.org>
* dejagnu: Search for a POSIX Awk and validate that at least a
simple Awk program actually works.
* testsuite/launcher.all/command.exp: Add tests for error produced
when no Awk is found and a help message is requested.
* lib/dejagnu.exp: Avoid reporting next test as UNRESOLVED when
reporting error due to missing size(1) while loading file.
* testsuite/lib/runtest.exp (runtest_copy_nested_testsuite_log):
New procedure. Dumps log from nested run into main test log.
* testsuite/runtest.main/pr42399.exp (test_pr42399): Revise to
ensure that a failure to produce any output at all in the inner
test will be detected. This was discovered on Solaris 10.
* testsuite/runtest.main/stats.exp: Copy stat.log from nested
testsuite run to the main test log upon test failure.
* testsuite/runtest.main/nested/testsuite/stat.test/unit-sub.exp:
Explicitly pass /dev/null to unit-sub.awk because /usr/bin/awk on
Solaris 10 does not seem to recognize assignment to ARGV.
* dejagnu: Search for a POSIX Awk and validate that at least a
simple Awk program actually works.
* testsuite/launcher.all/command.exp: Add tests for error produced
when no Awk is found and a help message is requested.
* testsuite/runtest.main/nested/testsuite/bug.test/pr42399-sub.exp:
Likewise.
2021-05-18 Jacob Bachmeyer <jcb@gnu.org>

3
testsuite/runtest.main/nested/testsuite/bug.test/pr42399-sub.exp

@ -21,5 +21,6 @@
load_lib dejagnu.exp
if {[info exists N]} {
host_execute [which awk] -f [testsuite file -source -test pr42399.awk] N=$N
host_execute [which awk] -f [testsuite file -source -test pr42399.awk] \
N=$N /dev/null
}

10
testsuite/runtest.main/pr42399.exp

@ -33,7 +33,7 @@ proc test_pr42399 {} {
foreach test_count {5 5000} {
set result pass
set failures [list]
set eof_reached 0
set want_num 1
set cmd_args [list --local_init nested-init.exp --tool bug \
-a pr42399-sub.exp N=$test_count]
@ -49,9 +49,15 @@ proc test_pr42399 {} {
exp_continue
}
eof {
$result "PR42399 test with $test_count inner tests"
set eof_reached 1
}
}
# Were any results at all produced?
if { $want_num == 1 } { set result unresolved }
# Did Expect report eof?
if { ! $eof_reached } { set result unresolved }
# emit test result
$result "PR42399 test with $test_count inner tests"
}
}

Loading…
Cancel
Save