blob: 6b1860fdae3084b1e163ee9bee8abc3631b04c8f [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
Jonathan Neuschäferc22ad582018-11-30 00:06:50 +01009TESTFILE000b=src/arch/ppc64/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
23TESTFILE005b=src/mainboard/aaeon/pfm-540i_revb/board_info.txt
24rm -f ${TESTFILE005a}
25sed -i.bak 's/^Category:.*/Category: lint/' ${TESTFILE005b}
26
27#lint-stable-006-board-name
28TESTFILE006=src/mainboard/amd/bettong/Kconfig.name
29rm -f ${TESTFILE006}
30
31#lint-stable-008-kconfig
32
33#lint-stable-009-old-licenses
34TESTFILE009=src/superio/common/conf_mode.c
35sed -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}
36git add ${TESTFILE009}
37
38#lint-stable-010-asm-syntax
39TESTFILE010=src/arch/x86/bootblock_romcc.S
40sed -i "1s/^/.att${UNDERSCORE}syntax noprefix\n/" ${TESTFILE010}
41git add ${TESTFILE010}
42
43#lint-stable-012-executable-bit
44TESTFILE012=src/lib/libgcc.c
45chmod +x ${TESTFILE012}
46
47#lint-stable-013-site-local
48mkdir -p site-local
49TESTFILE013=$(mktemp --tmpdir=site-local)
50git add -f ${TESTFILE013}