Skip to content

Commit 229f6a1

Browse files
committed
ci: yocto-check-layer: stop using the wrapper
The main task performed by the wrapper is to create a clean dir to execute the real yocto-check-layer, so we can do the same. The /bin/bash is because the source command is not provided by /bin/sh. We also clone the meta-qcom again in the new builddir from the REPO_DIR to avoid any polution/untracked files that may exist in the repository. This creates a clean copy of the meta-qcom repo inside the new build dir. Signed-off-by: Jose Quaresma <[email protected]>
1 parent 69124a3 commit 229f6a1

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

ci/yocto-check-layer.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh -e
1+
#!/bin/bash -e
22
# Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
33
# SPDX-License-Identifier: MIT
44

@@ -21,17 +21,23 @@ _is_dir(){
2121
_is_dir "$REPO_DIR"
2222
_is_dir "$WORK_DIR"
2323

24+
# Creates a temporary build directory to run the yocto-check-layer
25+
# script to avoid a contaminated environment.
26+
BUILDDIR="$(mktemp -p $WORK_DIR -d -t build-yocto-check-layer-XXXX)"
27+
source $WORK_DIR/oe-core/oe-init-build-env $BUILDDIR
28+
git -c advice.detachedHead=false clone --quiet --shared $REPO_DIR meta-qcom
29+
2430
# Yocto Project layer checking tool
25-
CMD="yocto-check-layer-wrapper"
31+
CMD="yocto-check-layer"
2632
# Layer to check
27-
CMD="$CMD $REPO_DIR"
33+
CMD="$CMD meta-qcom"
2834
# Disable auto layer discovery
2935
CMD="$CMD --no-auto"
3036
# Layers to process for dependencies
3137
CMD="$CMD --dependency $WORK_DIR/oe-core/meta"
3238
# Disable automatic testing of dependencies
3339
CMD="$CMD --no-auto-dependency"
3440
# Set machines to all machines defined in this BSP layer
35-
CMD="$CMD --machines $(echo $(find $REPO_DIR/conf/machine/ -maxdepth 1 -name *.conf -exec basename {} .conf \; ))"
41+
CMD="$CMD --machines $(echo $(find meta-qcom/conf/machine/ -maxdepth 1 -name *.conf -exec basename {} .conf \; ))"
3642

3743
exec $CMD

0 commit comments

Comments
 (0)