test-duplicateoptions.py without inotify
Mads Kiilerich
mads at kiilerich.com
Sun Jun 26 18:14:04 CDT 2011
Idan Kamara wrote, On 06/25/2011 09:19 AM:
> On Sat, Jun 25, 2011 at 1:24 AM, Mads Kiilerich<mads at kiilerich.com> wrote:
>> The inotify extension is only available on few platforms. That causes test-duplicateoptions.py to fail on platforms such as Solaris:
>> *** failed to import extension inotify: No module named inotify
>>
>> The failure can be simulated on linux with
>> make local
>> rm ./hgext/inotify/linux/_inotify.so
>> cd tests
>> ./run-tests.py -li test-duplicateoptions.py
(For the record: this failure is only seen with run-tests.py -l which
uses 'make local' for the test.)
>> Idan, will you fix it somehow?
> The error is written to stderr, so I guess this will do it:
>
> --- a/tests/test-duplicateoptions.py Fri Jun 24 23:25:42 2011 +0300
> +++ b/tests/test-duplicateoptions.py Sat Jun 25 10:17:07 2011 +0300
> @@ -17,6 +17,7 @@
> hgrc.close()
>
> u = ui.ui()
> +u.ferr = open(os.devnull, 'w')
> extensions.loadall(u)
>
> for cmd, entry in commands.table.iteritems():
>
>
> Or simply not load inotify. Unless someone has a better idea, I'll
> send one of these.
We would like to test inotify on the platforms where it is available, so
I guess '2> /dev/null' to mute the import failure is a fine solution as
long as it doesn't mute other relevant warnings. Please send it as a
'real' patch.
/Mads
More information about the Mercurial-devel
mailing list