blob: cf428252b970ad2760191c7ce4e9195f3e1605bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/bash
set -euo pipefail
set -x
TEST_MACHINE=${TEST_MACHINE:-qemux86-64}
TEST_BUILD_DIR=${TEST_BUILD_DIR:-build}
TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo}
TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.}
TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master}
TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="${TEST_AKTUALIZR_DIR}/.git" git rev-parse "${TEST_AKTUALIZR_BRANCH}")}
# move existing conf directory to backup, before generating a new one
rm -rf "${TEST_BUILD_DIR}/conf.old" || true
mv "${TEST_BUILD_DIR}/conf" "${TEST_BUILD_DIR}/conf.old" || true
(
set +euo pipefail
set +x
echo ">> Running envsetup.sh"
. "${TEST_REPO_DIR}/meta-updater/scripts/envsetup.sh" "${TEST_MACHINE}" "${TEST_BUILD_DIR}"
)
echo ">> Set aktualizr branch in bitbake's config"
cat << EOF > "${TEST_BUILD_DIR}/conf/site.conf"
SANITY_TESTED_DISTROS = ""
SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV"
SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}"
BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH"
BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}"
EOF
|