test: bill of materials check pass

release-3.2
Anthony Romano 2017-04-24 16:10:32 -07:00
parent 633a0a847b
commit b77de97136
1 changed files with 16 additions and 1 deletions

17
test
View File

@ -20,7 +20,7 @@ source ./build
etcd_setup_gopath
if [ -z "$PASSES" ]; then
PASSES="fmt dep compile build unit"
PASSES="fmt bom dep compile build unit"
fi
# Invoke ./cover for HTML output
@ -329,6 +329,21 @@ function fmt_pass {
done
}
function bom_pass {
if ! which license-bill-of-materials >/dev/null; then
return
fi
echo "Checking bill of materials..."
license-bill-of-materials \
--override-file bill-of-materials.override.json \
github.com/coreos/etcd github.com/coreos/etcd/etcdctl >bom-now.json || true
if ! diff bill-of-materials.json bom-now.json; then
echo vendored licenses do not match given bill of materials
exit 255
fi
rm bom-now.json
}
function dep_pass {
echo "Checking package dependencies..."
# don't pull in etcdserver package