Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | #!/bin/bash -eur |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 2 | # |
| 3 | # Find python modules uncovered by oe-seltest |
| 4 | # |
| 5 | # Copyright (c) 2016, Intel Corporation |
| 6 | # |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 7 | # SPDX-License-Identifier: GPL-2.0-only |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 8 | # |
| 9 | # Author: Ed Bartosh <ed.bartosh@linux.intel.com> |
| 10 | # |
| 11 | |
| 12 | if [ ! "$#" -eq 1 -o -t 0 ] ; then |
| 13 | echo 'Usage: coverage report | ./scripts/contrib/uncovered <dir>' 1>&2 |
| 14 | exit 1 |
| 15 | fi |
| 16 | |
| 17 | path=$(readlink -ev $1) |
| 18 | |
| 19 | if [ ! -d "$path" ] ; then |
| 20 | echo "directory $1 doesn't exist" 1>&2 |
| 21 | exit 1 |
| 22 | fi |
| 23 | |
| 24 | diff -u <(grep "$path" | grep -v '0%$' | cut -f1 -d: | sort) \ |
| 25 | <(find $path | xargs file | grep 'Python script' | cut -f1 -d:| sort) | \ |
| 26 | grep "^+$path" | cut -c2- |