Skip to content

Commit

Permalink
ci: Add various package configs and a simple test script.
Browse files Browse the repository at this point in the history
  • Loading branch information
gehwolf committed Aug 15, 2024
1 parent 469beec commit d229d3e
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ci/local.conf.benchmark
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
MACHINE ??= "qemux86-64"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"
PACKAGECONFIG:append:pn-elos = " daemon tools benchmark"
CORE_IMAGE_EXTRA_INSTALL += "elos elos-daemon elos-tools elos-benchmark"
19 changes: 19 additions & 0 deletions ci/local.conf.minimal
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
MACHINE ??= "qemux86-64"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"
PACKAGECONFIG:append:pn-elos = " daemon"
CORE_IMAGE_EXTRA_INSTALL += "elos elos-daemon"
19 changes: 19 additions & 0 deletions ci/local.conf.smoketest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
MACHINE ??= "qemux86-64"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"
PACKAGECONFIG:append:pn-elos = " daemon demos smoketest"
CORE_IMAGE_EXTRA_INSTALL += "elos elos-daemon elos-demos elos-smoketest"
21 changes: 21 additions & 0 deletions ci/local.conf.utest
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MACHINE ??= "qemux86-64"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"
PACKAGECONFIG:append:pn-elos = " daemon demos utests"
PACKAGECONFIG:append:pn-safu = " mocks"
PACKAGECONFIG:append:pn-samconf = " utests mocks"
CORE_IMAGE_EXTRA_INSTALL += "elos elos-daemon elos-demos elos-utest"
29 changes: 29 additions & 0 deletions ci/test_build_variants.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash


CMDPATH="$(realpath "$(dirname "$0")")"
BASEDIR="${CMDPATH%/*}"

RESULT_FILE="$(mktemp /tmp/meta-elos-test_XXXXXX.log)"

function test_config() {
LOCAL_CONF="$1"
cp "${LOCAL_CONF}" "${BASEDIR}/build/conf/local.conf" \
&& bitbake elos
if [ $? -ne 0 ]; then
echo "${LOCAL_CONF}: FAIL" | tee -a "${RESULT_FILE}"
else
echo "${LOCAL_CONF}: OK" | tee -a "${RESULT_FILE}"
fi
}

test_config "${BASEDIR}/ci/local.conf"
test_config "${BASEDIR}/ci/local.conf.minimal"
test_config "${BASEDIR}/ci/local.conf.smoketest"
test_config "${BASEDIR}/ci/local.conf.utest"
test_config "${BASEDIR}/ci/local.conf.benchmark"

echo "###################################"
echo "Results"
echo "###################################"
cat "${RESULT_FILE}"

0 comments on commit d229d3e

Please sign in to comment.