0.50.2: configure should honour the DIFF variable for tests/selftest

Bug #1294406 reported by Mark Solaris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intltool
New
Undecided
Unassigned

Bug Description

On some OS versions, diff(1) doesn't have '-u' by default, so we install the GNU coreutils version and gain it that way.

intltools 0.50.2 doesn't have an option to tune which diff to use, so errors are seen during the tests:

host:/var/tmp/intltool-0.50.2/tests root# ./selftest
Running self test of the intltool module

 1. Extract messages from simple desktop file: diff: illegal option -- u
usage: diff [-bitw] [-c | -e | -f | -h | -n] file1 file2
       diff [-bitw] [-C number] file1 file2
       diff [-bitw] [-D string] file1 file2
       diff [-bitw] [-c | -e | -f | -h | -n] [-l] [-r] [-s] [-S name] directory1 directory2
[FAILED] (extract1.desktop)
 2. Merge translations into a Bonobo UI style file: diff: illegal option -- u
usage: diff [-bitw] [-c | -e | -f | -h | -n] file1 file2
       diff [-bitw] [-C number] file1 file2
       diff [-bitw] [-D string] file1 file2
       diff [-bitw] [-c | -e | -f | -h | -n] [-l] [-r] [-s] [-S name] directory1 directory2
[FAILED] (merge1.xml)

host:/var/tmp/intltool-0.50.2 root# env | grep DIFF
DIFF=/usr/local/bin/diff

host:/var/tmp/intltool-0.50.2 root# grep diff */*
tests/selftest: check_command_result("diff -u $strip_trailing_cr $srcdir/results/$testcase.h cases/$testcase.h", $testcase);
tests/selftest: check_command_result("diff -u $strip_trailing_cr $srcdir/results/$testcase cases/$testcase", $testcase);
tests/selftest: check_command_result("diff -u $strip_trailing_cr $srcdir/results/multi.$testcase $language/$testcase", $testcase);

Since selftest is generated by selftest.pl.in --> selftest.pl --> selftest, the configure script can easily have a --use-diff= or test for DIFF env variable.

Mark Solaris (a-mark-8)
description: updated
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.