aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-07-07 21:09:37 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-07-07 21:09:37 +0200
commit28a86608a84672b3b64981c3b47b80b051cb5177 (patch)
treedf8120ff0e3f20ad35ae2dc1f1432009dd37464b /src
parent38342d75f64e0825505bbb6ff6e1a67b12bf3f17 (diff)
downloadrneovim-28a86608a84672b3b64981c3b47b80b051cb5177.tar.gz
rneovim-28a86608a84672b3b64981c3b47b80b051cb5177.tar.bz2
rneovim-28a86608a84672b3b64981c3b47b80b051cb5177.zip
CI: improve gcov handling #10404
- Move __gcov_flush to process_spawn, for more reliable coverage tracking of subprocesses - Travis: use GCOV_ERROR_FILE - codecov: use "-X fix" to skip "fixing" uploaded coverage data; it should be handled by codecov's backend instead. - AppVeyor: no $PATH mangling, which breaks with the improved coverage tracking due to missing .dll in PATH.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/event/process.c10
-rw-r--r--src/nvim/os/pty_process_unix.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/event/process.c b/src/nvim/event/process.c
index 7a8a39dbcf..990dee0c7f 100644
--- a/src/nvim/event/process.c
+++ b/src/nvim/event/process.c
@@ -26,6 +26,11 @@
// For PTY processes SIGTERM is sent first (in case SIGHUP was not enough).
#define KILL_TIMEOUT_MS 2000
+/// Externally defined with gcov.
+#ifdef USE_GCOV
+void __gcov_flush(void);
+#endif
+
static bool process_is_tearing_down = false;
/// @returns zero on success, or negative error code
@@ -50,6 +55,11 @@ int process_spawn(Process *proc, bool in, bool out, bool err)
proc->err.closed = true;
}
+#ifdef USE_GCOV
+ // Flush coverage data before forking, to avoid "Merge mismatch" errors.
+ __gcov_flush();
+#endif
+
int status;
switch (proc->type) {
case kProcessTypeUv:
diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c
index 97545a6cb1..5fdf0e6181 100644
--- a/src/nvim/os/pty_process_unix.c
+++ b/src/nvim/os/pty_process_unix.c
@@ -36,11 +36,6 @@
# include "os/pty_process_unix.c.generated.h"
#endif
-/// Externally defined with gcov.
-#ifdef USE_GCOV
-void __gcov_flush(void);
-#endif
-
/// termios saved at startup (for TUI) or initialized by pty_process_spawn().
static struct termios termios_default;
@@ -64,11 +59,6 @@ int pty_process_spawn(PtyProcess *ptyproc)
init_termios(&termios_default);
}
-#ifdef USE_GCOV
- // Flush coverage data before forking, to avoid "Merge mismatch" errors.
- __gcov_flush();
-#endif
-
int status = 0; // zero or negative error code (libuv convention)
Process *proc = (Process *)ptyproc;
assert(proc->err.closed);