File: test_shellcheck

package info (click to toggle)
ltt-control 2.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,744 kB
  • sloc: cpp: 207,706; sh: 28,837; python: 18,952; ansic: 11,636; makefile: 3,362; java: 109; xml: 46
file content (40 lines) | stat: -rwxr-xr-x 1,077 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (c) 2023 Olivier Dion <odion@efficios.com>

# Augment this list incrementally when a shell script passes shellcheck.
#
# All file must be relative to the test directory.
files=(
    meta/test_shellcheck
    regression/tools/channel/test_channel
    regression/tools/live/test_lttng_ust
    regression/tools/regen-metadata/test_ust
    regression/tools/regen-statedump/test_ust
    regression/tools/save-load/test_load
    regression/ust/before-after/test_before_after
    regression/ust/multi-session/test_multi_session
    regression/ust/overlap/test_overlap
    regression/ust/test_event_basic
    regression/ust/test_event_perf
    regression/ust/test_event_tracef
    utils/utils.sh
)

TESTDIR=$(dirname "$0")/..

# shellcheck source-path=SCRIPTDIR/..
source "$TESTDIR/utils/utils.sh"

function shellcheck_ok() {
    shellcheck --external-sources "$1"
    ok $? "Checking '$(get_path_from_top_dir "$1")'"
}

plan_tests "${#files[@]}"

for f in "${files[@]}";
do
    shellcheck_ok "$TESTDIR/$f"
done