From feeb2aa7250b0b97e1fa2111ccd731d599ab2e7f Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Fri, 12 Jul 2024 11:06:42 +0200 Subject: [PATCH 1/3] cleanup: remove unused function Unused for a while. Signed-off-by: Matthieu Baerts (NGI0) --- entrypoint.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ab5dd24..c4ba839 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1211,10 +1211,6 @@ EOF "${VIRTME_RUN_EXPECT}" | tee "${OUTPUT_VIRTME}" } -_get_selftests_gen_files() { - grep TEST_GEN_FILES "${SELFTESTS_DIR}/Makefile" | cut -d= -f2 -} - ccache_stat() { if is_ci; then log_section_start "CCache Stats" From fce216e601c53995311acb3cc3a63c86a6ffba63 Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Fri, 12 Jul 2024 11:13:21 +0200 Subject: [PATCH 2/3] grep: use --text: debug might contain binary Instead of displaying what has matched, it displays: grep (...).tap: binary file matches What we want to display is not a binary content. Signed-off-by: Matthieu Baerts (NGI0) --- entrypoint.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index c4ba839..837e236 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1347,14 +1347,14 @@ _print_tests_results_subtests() { local tap ok _print_tests_result() { local flaky echo "All tests:" # only from the main tests - grep --no-filename -E "^(not )?ok 1 test: " "${RESULTS_DIR}"/*.tap || true + grep --text --no-filename -E "^(not )?ok 1 test: " "${RESULTS_DIR}"/*.tap || true _print_tests_results_subtests "kunit_" _print_tests_results_subtests "packetdrill_" if is_ci; then - flaky="$(grep --no-filename -F " # IGNORE Flaky" "${RESULTS_DIR}"/*_subtests.tap || true)" + flaky="$(grep --text --no-filename -F " # IGNORE Flaky" "${RESULTS_DIR}"/*_subtests.tap || true)" else - flaky="$(grep --no-filename -F "[IGNO] (flaky)" "${RESULTS_DIR}"/*.tap || true)" + flaky="$(grep --text --no-filename -F "[IGNO] (flaky)" "${RESULTS_DIR}"/*.tap || true)" fi if [ -n "${flaky}" ]; then echo @@ -1372,7 +1372,7 @@ _print_failed_tests() { local t _print_line echo "- $(basename "${t}"):" echo - grep -v "^ok [0-9]\+ " "${t}" + grep -av "^ok [0-9]\+ " "${t}" fi done _print_line @@ -1381,7 +1381,7 @@ _print_failed_tests() { local t _get_failed_tests() { # not ok 1 test: selftest_mptcp_join.tap # exit=1 # we just want the main results, not the detailed ones for the moment - grep "^not ok 1 test: " "${TESTS_SUMMARY}" | \ + grep --text "^not ok 1 test: " "${TESTS_SUMMARY}" | \ awk '{ print $5 }' | \ sort -u | \ sed "s/\.tap$//g" From ccdd6d91955c184b644fa42f03d778f0fb1dd036 Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Fri, 12 Jul 2024 11:15:52 +0200 Subject: [PATCH 3/3] vscode: avoid inserting header It doesn't seem to work correctly, it inserts headers that were indirectly included, using double quotes and not <>: sounds better to disable this feature. Signed-off-by: Matthieu Baerts (NGI0) --- vscode/settings-extra.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vscode/settings-extra.json b/vscode/settings-extra.json index 0415b8b..61427d8 100644 --- a/vscode/settings-extra.json +++ b/vscode/settings-extra.json @@ -1,6 +1,7 @@ { "clangd.arguments": [ - "-compile-commands-dir=${workspaceFolder}/.virtme/build-clang" + "-compile-commands-dir=${workspaceFolder}/.virtme/build-clang", + "-header-insertion=never" ], "files.watcherExclude": { "**/.git/objects/**": true,