xref: /openbmc/qemu/tests/qemu-iotests/297 (revision 19b7868eff865c01985a5d37f1c9c0c8691b0001)
1*19b7868eSKevin Wolf#!/usr/bin/env bash
2*19b7868eSKevin Wolf#
3*19b7868eSKevin Wolf# Copyright (C) 2020 Red Hat, Inc.
4*19b7868eSKevin Wolf#
5*19b7868eSKevin Wolf# This program is free software; you can redistribute it and/or modify
6*19b7868eSKevin Wolf# it under the terms of the GNU General Public License as published by
7*19b7868eSKevin Wolf# the Free Software Foundation; either version 2 of the License, or
8*19b7868eSKevin Wolf# (at your option) any later version.
9*19b7868eSKevin Wolf#
10*19b7868eSKevin Wolf# This program is distributed in the hope that it will be useful,
11*19b7868eSKevin Wolf# but WITHOUT ANY WARRANTY; without even the implied warranty of
12*19b7868eSKevin Wolf# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*19b7868eSKevin Wolf# GNU General Public License for more details.
14*19b7868eSKevin Wolf#
15*19b7868eSKevin Wolf# You should have received a copy of the GNU General Public License
16*19b7868eSKevin Wolf# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17*19b7868eSKevin Wolf
18*19b7868eSKevin Wolfseq=$(basename $0)
19*19b7868eSKevin Wolfecho "QA output created by $seq"
20*19b7868eSKevin Wolf
21*19b7868eSKevin Wolfstatus=1	# failure is the default!
22*19b7868eSKevin Wolf
23*19b7868eSKevin Wolf# get standard environment
24*19b7868eSKevin Wolf. ./common.rc
25*19b7868eSKevin Wolf
26*19b7868eSKevin Wolfif ! type -p "pylint-3" > /dev/null; then
27*19b7868eSKevin Wolf    _notrun "pylint-3 not found"
28*19b7868eSKevin Wolffi
29*19b7868eSKevin Wolfif ! type -p "mypy" > /dev/null; then
30*19b7868eSKevin Wolf    _notrun "mypy not found"
31*19b7868eSKevin Wolffi
32*19b7868eSKevin Wolf
33*19b7868eSKevin Wolfpylint-3 --score=n iotests.py
34*19b7868eSKevin Wolf
35*19b7868eSKevin WolfMYPYPATH=../../python/ mypy --warn-unused-configs --disallow-subclassing-any \
36*19b7868eSKevin Wolf    --disallow-any-generics --disallow-incomplete-defs \
37*19b7868eSKevin Wolf    --disallow-untyped-decorators --no-implicit-optional \
38*19b7868eSKevin Wolf    --warn-redundant-casts --warn-unused-ignores \
39*19b7868eSKevin Wolf    --no-implicit-reexport iotests.py
40*19b7868eSKevin Wolf
41*19b7868eSKevin Wolf# success, all done
42*19b7868eSKevin Wolfecho "*** done"
43*19b7868eSKevin Wolfrm -f $seq.full
44*19b7868eSKevin Wolfstatus=0
45