summaryrefslogtreecommitdiffstats
path: root/util/lint/check_lint_tests
blob: 6c050ee13b88a8572c56434c8ab4f6a1c975cee3 (plain)
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
41
42
43
44
45
46
47
48
#!/usr/bin/env bash

# test to make sure the lint tests fail
SPACE=' '
UNDERSCORE='_'

#lint-stable-000-license-headers
TESTFILE000a=src/arch/x86/thread.c
TESTFILE000b=src/arch/riscv/misc.c
sed -i.bak 's/^[[:space:]]\*[[:space:]].*//' ${TESTFILE000a}
sed -i.bak 's/^[[:space:]]\*[[:space:]]but WITHOUT ANY WARRANTY;//' ${TESTFILE000b}

#lint-stable-003-whitespace
TESTFILE003=src/acpi/sata.c
sed -i.bak 's/^$/ /' ${TESTFILE003}

#lint-stable-004-style-labels
TESTFILE004=src/soc/nvidia/tegra124/spi.c
sed -i.bak 's/^done:/ done:/' ${TESTFILE004}

#lint-stable-005-board-status
TESTFILE005a=src/mainboard/google/storm/board_info.txt
sed -i.bak 's/^Category:.*/Category: lint/' ${TESTFILE005a}

#lint-stable-006-board-name
TESTFILE006=src/mainboard/ibase/mb899/Kconfig.name
rm -f ${TESTFILE006}

#lint-stable-008-kconfig

#lint-stable-009-old-licenses
TESTFILE009=src/superio/common/conf_mode.c
sed -i "s/for more details./for more details.\n \* You${SPACE}should${SPACE}have received a copy of the GNU General Public License\n \* along with this program; if not, write to the Free Software\n \* Foundation, Inc./" ${TESTFILE009}
git add ${TESTFILE009}

#lint-stable-010-asm-syntax
TESTFILE010=src/arch/x86/bootblock_crt0.S
sed -i "1s/^/.att${UNDERSCORE}syntax noprefix\n/" ${TESTFILE010}
git add ${TESTFILE010}

#lint-stable-012-executable-bit
TESTFILE012=src/lib/libgcc.c
chmod +x ${TESTFILE012}

#lint-stable-013-site-local
mkdir -p site-local
TESTFILE013=$(mktemp --tmpdir=site-local)
git add -f ${TESTFILE013}