Merge lp://staging/~jamesodhunt/upstart/bug-1360208 into lp://staging/upstart
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~jamesodhunt/upstart/bug-1360208 |
Merge into: | lp://staging/upstart |
Diff against target: |
1966 lines (+943/-321) 5 files modified
ChangeLog (+37/-0) extra/upstart-file-bridge.c (+403/-164) scripts/pyupstart.py (+46/-20) scripts/tests/test_pyupstart_session_init.py (+368/-57) scripts/tests/test_pyupstart_system_init.py (+89/-80) |
To merge this branch: | bzr merge lp://staging/~jamesodhunt/upstart/bug-1360208 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Upstart Reviewers | Pending | ||
Review via email: mp+234869@code.staging.launchpad.net |
Description of the change
Fix for bug 1360208.
* extra/upstart-
- Converted original_path() macro to a function.
- WatchedFile: Added more details on this crucial type.
- file_filter(): Removed as it was too simplistic and duplicating the
work of the individual handlers in determining whether a path should
be considered.
- create_handler(): Simplified.
- modify_handler(): Simplified.
- delete_handler(): Simplified.
- handle_event(): Now deals with globs and handles tilde+glob jobs
(LP: #1360208).
- handle_glob(): New function that allows main handlers to be simplified.
- Added lots of debug for '--debug'.
- expand_path(): Only check password database if $HOME not set. This
allows the tests to use a fake $HOME to check that tilde expansion
works without modifying the users actual $HOME.
- New utility functions:
- file_exists()
- remove_
* scripts/
- Add missing file header.
- pep8 formatting changes.
* scripts/
- test_init_
- Force the file bridge to run with a fake $HOME below /tmp to
allow testing jobs with paths that require tilde expansion.
- Run file bridge in foreground to capture debug output.
- Change tests to check for values of all variables the file-event(7)
sets.
- New tests for:
- glob file job.
- tilde file job.
- glob and tilde file job.
* scripts/
Unmerged revisions
- 1662. By James Hunt
-
* Sync with lp:upstart.
- 1661. By James Hunt
-
* extra/upstart-
file-bridge. c:
- Converted original_path() macro to a function.
- WatchedFile: Added more details on this crucial type.
- file_filter(): Removed as it was too simplistic and duplicating the
work of the individual handlers in determining whether a path should
be considered.
- create_handler(): Simplified.
- modify_handler(): Simplified.
- delete_handler(): Simplified.
- handle_event(): Now deals with globs and handles tilde+glob jobs
(LP: #1360208).
- handle_glob(): New function that allows main handlers to be simplified.
- Added lots of debug for '--debug'.
- expand_path(): Only check password database if $HOME not set. This
allows the tests to use a fake $HOME to check that tilde expansion
works without modifying the users actual $HOME.
- New utility functions:
- file_exists()
- remove_trailing_ slashes( )
* scripts/pyupstart. py:
- Add missing file header.
- pep8 formatting changes.
* scripts/tests/test_ pyupstart_ session_ init.py: TestFileBridge:
- test_init_start_file_ bridge( ):
- Force the file bridge to run with a fake $HOME below /tmp to
allow testing jobs with paths that require tilde expansion.
- Run file bridge in foreground to capture debug output.
- Change tests to check for values of all variables the file-event(7)
sets.
- New tests for:
- glob file job.
- tilde file job.
- glob and tilde file job.
* scripts/tests/test_ pyupstart_ system_ init.py: pep8 formatting changes.
To test the file bridge, run the unit tests:
$ cd scripts && python3 -munittest