ewollesen / autotest-inotify

Teaches autotest to use inotify (on Linux) instead of filesystem polling.
http://kill-0.com/projects/autotest-inotify
MIT License
18 stars 7 forks source link

.autotest mappings / exceptions fail to load if inotify is required in user's .autotest file #15

Open jhulford opened 11 years ago

jhulford commented 11 years ago

I'm not sure this project is maintained in any way any longer, but I just had to fix something myself so I figured I'd post something here for anyone else that may run into the issue:

This occurs when running the full ZenTest version of autotest (not sure about the standalone one)

I have a .autotest in my home dir which has some non-project specific configurations and then another in my project's directory. Due to the way inotify hooks into the :initialize hook and doesn't return a falsy value, any hooks you may try to add yourself that execute after inotify's will not get run.

The inotify setup also triggers some autotest internals to get touched when it calls the find_files method from setup_inotify resulting in not being able to add exceptions or mappings.

The solution for me was to change the hook in inotify.rb to use the :post_initialize hook and to also have it return false.