Re: [PATCH v2 09/13] git-p4: use `test_atexit` to kill the daemon
- From
Luke Diamand <luke@diamand.org>
- Date
- Oct 15, 2018, 20:19 UTC
- Message-ID
- <CAE5ih78gCgJgeXasdm6j+hO8Bk+_zk_-o5FqkMTr-q7fKDej9Q@mail.gmail.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.1810151657080.4546@tvgsbejvaqbjf.bet>
On Mon, 15 Oct 2018 at 16:02, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 28 quoted lines
> > Hi Luke, > > On Mon, 15 Oct 2018, Luke Diamand wrote: > > > On Mon, 15 Oct 2018 at 11:12, Johannes Schindelin via GitGitGadget > > <gitgitgadget@gmail.com> wrote: > > > > > > From: Johannes Schindelin <johannes.schindelin@gmx.de> > > > > > > This should be more reliable than the current method, and prepares the > > > test suite for a consistent way to clean up before re-running the tests > > > with different options. > > > > > > > I'm finding that it's leaving p4d processes lying around. > > That's a bummer! > > > e.g. > > > > $ ./t9820-git-p4-editor-handling.sh > > <passes> > > $ ./t9820-git-p4-editor-handling.sh > > <fails> > > Since I do not currently have a setup with p4d installed, can you run that > with `sh -x ...` and see whether this code path is hit?
All you need to do is to put p4 and p4d in your PATH.
https://www.perforce.com/downloads/helix-core-p4d https://www.perforce.com/downloads/helix-command-line-client-p4
The server is free to use for a small number of users, you don't need to do anything to make it go.
Show 6 quoted lines
>
> test_done () {
> GIT_EXIT_OK=t
>
> + test -n "$immediate" || test_atexit_handler
> ++ test -n + test_atexit_handler ./t9820-git-p4-editor-handling.sh: 764: ./t9820-git-p4-editor-handling.sh: test_atexit_handler: not found
Is that expected?
Show 18 quoted lines
> if test -n "$write_junit_xml" && test -n "$junit_xml_path" > then > > > And also > > > > $ ./t9800-git-p4-basic.sh > > <starts running tests, but I get bored easily> > > Ctrl-C > > Oh, you're right. I think I need to do something in this line: > > trap 'exit $?' INT > > in t/test-lib.sh, something like > > trap 'exit_code=$?; test_atexit_handler; exit $exit_code' INT > > would you agree? (And: could you test?)
Not sure. Send me a patch and I can try it out.
Thanks, Luke