Browse Source

Fix portability problem with /usr/bin/awk on Solaris 10 in stats test

The /usr/bin/awk on Solaris 10 is a pre-POSIX Awk that, among other
limitations, does not recognize the ARGV array as special.
dejagnu-1.6.3
Jacob Bachmeyer 5 years ago
parent
commit
3be6fdc0ee
  1. 4
      ChangeLog
  2. 4
      testsuite/runtest.main/nested/testsuite/stat.test/unit-sub.exp

4
ChangeLog

@ -1,5 +1,9 @@
2021-05-20 Jacob Bachmeyer <jcb@gnu.org> 2021-05-20 Jacob Bachmeyer <jcb@gnu.org>
* 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 * dejagnu: Search for a POSIX Awk and validate that at least a
simple Awk program actually works. simple Awk program actually works.
* testsuite/launcher.all/command.exp: Add tests for error produced * testsuite/launcher.all/command.exp: Add tests for error produced

4
testsuite/runtest.main/nested/testsuite/stat.test/unit-sub.exp

@ -22,5 +22,7 @@ load_lib dejagnu.exp
if { [info exists STATS_TEST] } { if { [info exists STATS_TEST] } {
host_execute [which awk] -f [testsuite file -source -test unit-sub.awk] \ host_execute [which awk] -f [testsuite file -source -test unit-sub.awk] \
UNIT_RESULT=$STATS_TEST UNIT_RESULT=$STATS_TEST /dev/null
} }
# Solaris 10 /usr/bin/awk needs /dev/null actually passed on the command
# line, but will run unit-sub.awk without problems if that is done.

Loading…
Cancel
Save