Skip to content
Commit 5b19a9b9 authored by Yuval Peress's avatar Yuval Peress Committed by Benjamin Cabé
Browse files

twister: Better manage gcov sym link



In twister coverage runs we create the gcov sym link to llvm-cov
executable. This code runs multiple times which causes errors with the
current implementation since creating the symlink will fail; then
copying will also fail because we're using the symlink (self copy the
file).

Add a helper function to `try_making_symlink` which will handle the
following cases:
1. If the symlink already exists and is correct, do nothing.
2. If the symlink exists but points to the wrong file, replace it.
3. If the symlink doesn't exist create it.
4. If creating a symlink fails, just copy the file.

Signed-off-by: default avatarYuval Peress <peress@google.com>
parent 3cf4e2f9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment