[make check] extension tests fail on OS X (script assumes GNU versions of mktemp and sed)

Bug #1204445 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
su_v

Bug Description

The script 'share/extensions/test/run-all-extension-tests' (this is run as second test of 'make check') fails on BSD-based systems (e.g. OS X) which do not have GNU tools (coreutils) installed in $PATH (thus overriding the system BSD versions of mktemp and sed in '/usr/bin'):

$ ./run-all-extension-tests

##### Extension Tests #####
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]

>> Testing
/Volumes/magenta/mp-trunk/x11/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '.test.py': [Errno 2] No such file or directory
./run-all-extension-tests: line 34: $failed_tests: ambiguous redirect
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]

(…)

Notes:
The attached diff (patching 'share/extensions/test/run-all-extension-tests') makes the test script run successfully on OS X 10.7.5 - I haven't tested the changes on GNU/Linux or other BSD-based systems though, nor on Macs running other versions of (Mac) OS X.

Possibly these kind of changes could be replaced by some autotools magic, but that's beyond my current skill set: The changes (add version test for mktemp and sed in the bash script, modify arguments depending on detected version) are based on solutions picked rather "randomly" from Google search results, and only served as interim solutions while investigating the issue before filing the report.

---
Keyword: cxxtest

Tags: build osx
Revision history for this message
su_v (suv-lp) wrote :
su_v (suv-lp)
description: updated
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Patch works fine for me. Committed in lp:inkscape r12483

Changed in inkscape:
assignee: nobody → ~suv (suv-lp)
importance: Undecided → Medium
milestone: none → 0.49
status: New → Fix Committed
su_v (suv-lp)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.