Thread (192 messages) 192 messages, 13 authors, 2021-03-26

Re: [PATCH v2 09/13] git-p4: use `test_atexit` to kill the daemon

From: Luke Diamand <hidden>
Date: 2018-10-15 20:19:33

On Mon, 15 Oct 2018 at 16:02, Johannes Schindelin
[off-list ref] wrote:
Hi Luke,

On Mon, 15 Oct 2018, Luke Diamand wrote:
quoted
On Mon, 15 Oct 2018 at 11:12, Johannes Schindelin via GitGitGadget
[off-list ref] wrote:
quoted
From: Johannes Schindelin <redacted>

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!
quoted
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.

 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?



        if test -n "$write_junit_xml" && test -n "$junit_xml_path"
        then
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help