blob: f16128cb7ac8c6d663f5647ceb85a4668c41db43 [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -06001#!/bin/bash -eur
Patrick Williamsc0f7c042017-02-23 20:41:17 -06002#
3# Find python modules uncovered by oe-seltest
4#
5# Copyright (c) 2016, Intel Corporation
6#
Brad Bishopc342db32019-05-15 21:57:59 -04007# SPDX-License-Identifier: GPL-2.0-only
Patrick Williamsc0f7c042017-02-23 20:41:17 -06008#
9# Author: Ed Bartosh <ed.bartosh@linux.intel.com>
10#
11
12if [ ! "$#" -eq 1 -o -t 0 ] ; then
13 echo 'Usage: coverage report | ./scripts/contrib/uncovered <dir>' 1>&2
14 exit 1
15fi
16
17path=$(readlink -ev $1)
18
19if [ ! -d "$path" ] ; then
20 echo "directory $1 doesn't exist" 1>&2
21 exit 1
22fi
23
24diff -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-