scripts/run-patchmetrics: Update for bitbake-setup layout changes

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2025-10-16 13:38:02 +01:00
parent 0897be5e47
commit 63f4e3954f
2 changed files with 11 additions and 11 deletions

View File

@ -1273,15 +1273,15 @@
},
"step2" : {
"shortname" : "Patch metrics for meta",
"EXTRACMDS" : ["${SCRIPTSDIR}/run-patchmetrics --poky ../ --metrics ../yocto-metrics --repo ../ --layer ../meta --branch ${HELPERBRANCHNAME} --results ${HELPERRESULTSDIR}/../../patchmetrics --push"]
"EXTRACMDS" : ["${SCRIPTSDIR}/run-patchmetrics --oecore ../layers/openembedded-core/ --metrics ./yocto-metrics --repo ../layers/openembedded-core/ --layer ../layers/openembedded-core/meta --branch ${HELPERBRANCHNAME} --results ${HELPERRESULTSDIR}/../../patchmetrics --push"]
},
"step3" : {
"shortname" : "CVE checks for meta",
"EXTRACMDS" : ["${SCRIPTSDIR}/run-cvecheck --metrics ../yocto-metrics --branch ${HELPERBRANCHNAME} --results ${HELPERRESULTSDIR}/../../patchmetrics --push"]
"EXTRACMDS" : ["${SCRIPTSDIR}/run-cvecheck --metrics ./yocto-metrics --branch ${HELPERBRANCHNAME} --results ${HELPERRESULTSDIR}/../../patchmetrics --push"]
},
"step4" : {
"shortname" : "Patch metrics for meta-oe",
"EXTRACMDS" : ["${SCRIPTSDIR}/run-patchmetrics --poky ../ --metrics ../yocto-metrics-meta-oe --repo ../meta-openembedded --layer ../meta-openembedded --branch ${HELPERBRANCHNAME} --results ${HELPERRESULTSDIR}/../../patchmetrics-meta-oe --push"]
"EXTRACMDS" : ["${SCRIPTSDIR}/run-patchmetrics --oecore ../layers/openembedded-core/ --metrics ./yocto-metrics-meta-oe --repo ../meta-openembedded --layer ../meta-openembedded --branch ${HELPERBRANCHNAME} --results ${HELPERRESULTSDIR}/../../patchmetrics-meta-oe --push"]
},
"step5" : {
"shortname" : "CVE checks for meta-oe",
@ -1297,7 +1297,7 @@
"${BUILDDIR}/../meta-openembedded/meta-initramfs",
"${BUILDDIR}/../meta-openembedded/meta-webserver"
],
"EXTRACMDS" : ["echo 'do_cve_check:layer-core = \"\"' >> conf/auto.conf ; ${SCRIPTSDIR}/run-cvecheck --metrics ../yocto-metrics-meta-oe --branch ${HELPERBRANCHNAME} --results ${HELPERRESULTSDIR}/../../patchmetrics-meta-oe --push"]
"EXTRACMDS" : ["echo 'do_cve_check:layer-core = \"\"' >> conf/auto.conf ; ${SCRIPTSDIR}/run-cvecheck --metrics ./yocto-metrics-meta-oe --branch ${HELPERBRANCHNAME} --results ${HELPERRESULTSDIR}/../../patchmetrics-meta-oe --push"]
},
"step6": {
"shortname": "AB-INT report",

View File

@ -5,7 +5,7 @@
set -eu
ARGS=$(getopt -o '' --long 'poky:,metrics:,repo:,layer:,branch:,results:,push' -n 'run-patchmetrics' -- "$@")
ARGS=$(getopt -o '' --long 'oecore:,metrics:,repo:,layer:,branch:,results:,push' -n 'run-patchmetrics' -- "$@")
if [ $? -ne 0 ]; then
echo 'Cannot parse arguments...' >&2
exit 1
@ -15,8 +15,8 @@ unset ARGS
# Location of the yocto-autobuilder-helper scripts
OURDIR=$(dirname $0)
# Where Poky is (for patchreview.py)
POKYDIR=""
# Where OE-Core is (for patchreview.py)
OECOREDIR=""
# The metrics repository to use
METRICSDIR=""
# Where to copy results to
@ -30,8 +30,8 @@ PUSH=0
while true; do
case "$1" in
'--poky')
POKYDIR=$(realpath $2)
'--oecore')
OECOREDIR=$(realpath $2)
shift 2
continue
;;
@ -76,7 +76,7 @@ while true; do
esac
done
if ! test "$POKYDIR" -a "$METRICSDIR" -a "$REPODIR" -a "$LAYERDIR" -a "$BRANCH" -a "$RESULTSDIR"; then
if ! test "$OECOREDIR" -a "$METRICSDIR" -a "$REPODIR" -a "$LAYERDIR" -a "$BRANCH" -a "$RESULTSDIR"; then
echo "Not all required options specified"
exit 1
fi
@ -98,7 +98,7 @@ git -C $METRICSDIR pull
#
set -x
$OURDIR/patchmetrics-update --patchscript $POKYDIR/scripts/contrib/patchreview.py --json $METRICSDIR/patch-status.json --repo $REPODIR --layer $LAYERDIR
$OURDIR/patchmetrics-update --patchscript $OECOREDIR/scripts/contrib/patchreview.py --json $METRICSDIR/patch-status.json --repo $REPODIR --layer $LAYERDIR
set +x
# Allow the commit to fail if there is nothing to commit