Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame^] | 1 | #!/bin/bash -eur |
| 2 | # ex:ts=4:sw=4:sts=4:et |
| 3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- |
| 4 | # |
| 5 | # Find python modules uncovered by oe-seltest |
| 6 | # |
| 7 | # Copyright (c) 2016, Intel Corporation |
| 8 | # |
| 9 | # This program is free software; you can redistribute it and/or modify |
| 10 | # it under the terms of the GNU General Public License version 2 as |
| 11 | # published by the Free Software Foundation. |
| 12 | # |
| 13 | # This program is distributed in the hope that it will be useful, |
| 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | # GNU General Public License for more details. |
| 17 | # |
| 18 | # You should have received a copy of the GNU General Public License along |
| 19 | # with this program; if not, write to the Free Software Foundation, Inc., |
| 20 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 21 | # |
| 22 | # Author: Ed Bartosh <ed.bartosh@linux.intel.com> |
| 23 | # |
| 24 | |
| 25 | if [ ! "$#" -eq 1 -o -t 0 ] ; then |
| 26 | echo 'Usage: coverage report | ./scripts/contrib/uncovered <dir>' 1>&2 |
| 27 | exit 1 |
| 28 | fi |
| 29 | |
| 30 | path=$(readlink -ev $1) |
| 31 | |
| 32 | if [ ! -d "$path" ] ; then |
| 33 | echo "directory $1 doesn't exist" 1>&2 |
| 34 | exit 1 |
| 35 | fi |
| 36 | |
| 37 | diff -u <(grep "$path" | grep -v '0%$' | cut -f1 -d: | sort) \ |
| 38 | <(find $path | xargs file | grep 'Python script' | cut -f1 -d:| sort) | \ |
| 39 | grep "^+$path" | cut -c2- |