blob: 6c050ee13b88a8572c56434c8ab4f6a1c975cee3 [file] [log] [blame]
Yegor Timoshenkoc2e49412018-10-07 01:58:27 +00001#!/usr/bin/env bash
Martin Rothef5a2382016-03-30 14:51:31 -06002
3# test to make sure the lint tests fail
4SPACE=' '
5UNDERSCORE='_'
6
7#lint-stable-000-license-headers
8TESTFILE000a=src/arch/x86/thread.c
Elyes HAOUASb61a4da2020-02-29 10:37:37 +01009TESTFILE000b=src/arch/riscv/misc.c
Martin Rothef5a2382016-03-30 14:51:31 -060010sed -i.bak 's/^[[:space:]]\*[[:space:]].*//' ${TESTFILE000a}
11sed -i.bak 's/^[[:space:]]\*[[:space:]]but WITHOUT ANY WARRANTY;//' ${TESTFILE000b}
12
13#lint-stable-003-whitespace
14TESTFILE003=src/acpi/sata.c
15sed -i.bak 's/^$/ /' ${TESTFILE003}
16
17#lint-stable-004-style-labels
18TESTFILE004=src/soc/nvidia/tegra124/spi.c
19sed -i.bak 's/^done:/ done:/' ${TESTFILE004}
20
21#lint-stable-005-board-status
22TESTFILE005a=src/mainboard/google/storm/board_info.txt
Elyes HAOUASb61a4da2020-02-29 10:37:37 +010023sed -i.bak 's/^Category:.*/Category: lint/' ${TESTFILE005a}
Martin Rothef5a2382016-03-30 14:51:31 -060024
25#lint-stable-006-board-name
Elyes HAOUASb61a4da2020-02-29 10:37:37 +010026TESTFILE006=src/mainboard/ibase/mb899/Kconfig.name
Martin Rothef5a2382016-03-30 14:51:31 -060027rm -f ${TESTFILE006}
28
29#lint-stable-008-kconfig
30
31#lint-stable-009-old-licenses
32TESTFILE009=src/superio/common/conf_mode.c
33sed -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}
34git add ${TESTFILE009}
35
36#lint-stable-010-asm-syntax
Elyes HAOUAS8297fa12020-02-22 10:37:49 +010037TESTFILE010=src/arch/x86/bootblock_crt0.S
Martin Rothef5a2382016-03-30 14:51:31 -060038sed -i "1s/^/.att${UNDERSCORE}syntax noprefix\n/" ${TESTFILE010}
39git add ${TESTFILE010}
40
41#lint-stable-012-executable-bit
42TESTFILE012=src/lib/libgcc.c
43chmod +x ${TESTFILE012}
44
45#lint-stable-013-site-local
46mkdir -p site-local
47TESTFILE013=$(mktemp --tmpdir=site-local)
48git add -f ${TESTFILE013}