GNOME Bugzilla – Bug 668228
several of the tests use syntax not compatible with traditional Bourne shells
Last modified: 2012-01-19 10:26:30 UTC
Created attachment 205592 [details] [review] fix a few constructs to make them compatible with the traditional Bourne shell I'm building gtk-doc-1.18 on x86_64-sun-solaris2.10 using the no-cost Oracle Studio 12.2 compiler suite. Several of the shell scripts that are part of the test process use syntax that the traditional Bourne shell doesn't support. This causes the test suite to output error messages from the scripts and spurious failures from the tests. Examples: gmake[3]: Entering directory `/local/src/RPM/BUILD/gtk-doc-1.18/tests' Running suite(s): gtk-doc-tools ./tools.sh: syntax error at line 15: `failed=$' unexpected FAIL: tools.sh Running suite(s): gtk-doc-tester tester-undocumented.txt:1:E: 4 undocumented or incomplete symbols 75.0%: Checks 4, Failures: 1 FAIL: gobject.sh Running suite(s): gtk-doc-tester 100.0%: Checks 4, Failures: 0 PASS: bugs.sh Running suite(s): gtk-doc-tester 100.0%: Checks 4, Failures: 0 PASS: annotations.sh Running suite(s): gtk-doc-fail ./fail.sh: syntax error at line 17: `failed=$' unexpected FAIL: fail.sh Running suite(s): gtk-doc-tester 100.0%: Checks 4, Failures: 0 PASS: empty.sh Running suite(s): gtk-doc-sanity ./sanity.sh: syntax error at line 16: `nok=$' unexpected FAIL: sanity.sh ======================================================================== 4 of 7 tests failed The attached patch fixes all the instances of shell syntax that the Solaris shell complains about. It should make the scripts more compatible with any traditional Bourne shell. After the patch, all the tests pass for me on x86_64-sun-solaris2.10. The syntax changes amount to: - use `expr $op1 op $op2` instead of $(($op1 op $op2)) - use test -f instead of test -e, since -e is not present in the Bourne shell.
Comment on attachment 205592 [details] [review] fix a few constructs to make them compatible with the traditional Bourne shell Author: Tim Mooney <mooney@dogbert.cc.ndsu.nodak.edu> Date: Thu Jan 19 10:34:02 2012 +0100 tests: make tests compatible with the traditional Bourne shell