Skip to content
This repository has been archived by the owner on Apr 5, 2020. It is now read-only.

Unittest watcher #24

Merged
merged 5 commits into from
May 19, 2015
Merged

Unittest watcher #24

merged 5 commits into from
May 19, 2015

Conversation

thekid
Copy link
Member

@thekid thekid commented May 18, 2015

This adds a new command line option to the unittest runner, -w.

-w {dir}: Run indefinitely, watch given directory for changes

The framework needs to adapt slighty - see xp-framework/core#75.

For XP 5, the only thing that happens is:

$ USE_XP=../xp-5x/core unittest -w . -?
*** Class "-w" could not be found

...but the changes could of course be easily backported there, too (@kiesel - might be interesting for XP 5.11 which you're currently planning?)

thekid added 5 commits May 18, 2015 23:12
Watches the given directory and re-runs the unittests (in a fresh
process!) as soon as files change inside the directory

Example: $ unittest -w src src/test/php
Requires a patch to the unittest runner in order to make these
exit 255
fi

inotifywait -q -e close_write -m -r $OPTARG | while read event
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a test here if inotifywait is installed?

Here's what my shell says if not:

$ inotifywait -q -e close_write -m -r . | while read event ; do echo "E $event" ; done
-bash: inotifywait: command not found

Pretty good already, I guess.

thekid added a commit that referenced this pull request May 19, 2015
@thekid thekid merged commit 0ff1af5 into master May 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant