1#!/bin/bash -eur 2# 3# Find python modules uncovered by oe-seltest 4# 5# Copyright (c) 2016, Intel Corporation 6# 7# SPDX-License-Identifier: GPL-2.0-only 8# 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- 27