After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668228 - several of the tests use syntax not compatible with traditional Bourne shells
several of the tests use syntax not compatible with traditional Bourne shells
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.18
Other Solaris
: Normal normal
: 1.19
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-19 00:23 UTC by Tim Mooney
Modified: 2012-01-19 10:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix a few constructs to make them compatible with the traditional Bourne shell (5.90 KB, patch)
2012-01-19 00:23 UTC, Tim Mooney
committed Details | Review

Description Tim Mooney 2012-01-19 00:23:47 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 1 Stefan Sauer (gstreamer, gtkdoc dev) 2012-01-19 10:26:16 UTC
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