Commit e02f56a2 authored by Emanuele Aina's avatar Emanuele Aina

ade: Drop custom LAVA signaling

Rely on `set -e` to make the scripts immediately exit on failure and on
`run-test-in-systemd` as called by the YAML testcase to signal failures to LAVA
appropriately.

This simplifies the code and also avoids inconsistencies between the testcase
names used inside the scripts and by `run-test-in-systemd`.
Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 11e61368
......@@ -28,15 +28,6 @@
set -eux
checkCmd()
{
$1;
if [ $? != 0 ]; then
echo "TEST_RESULT:fail:ade-tests-custom:$1"
exit 1
fi
}
. /etc/os-release # import $ID and $VERSION_ID
LANG=C.UTF-8
......@@ -47,33 +38,31 @@ ARCH=arm64 # the non-default one to be tested
SYSROOTINDEX="https://images.apertis.org/sysroot/$OLDRELEASE/sysroot-$DISTRIBUTION-$OLDRELEASE-$ARCH"
SAMPLEAGENTREPO=https://gitlab.apertis.org/sample-applications/helloworld-simple-agent/
checkCmd "git clone $SAMPLEAGENTREPO sample-app"
git clone $SAMPLEAGENTREPO sample-app
checkCmd "ade sysroot list"
ade sysroot list
echo ==== Testing ade usage with custom parameters
checkCmd "ade sysroot installed --distro $DISTRIBUTION --release $OLDRELEASE --arch $ARCH"
checkCmd "ade sysroot latest --distro $DISTRIBUTION --release $OLDRELEASE --arch $ARCH"
ade sysroot installed --distro $DISTRIBUTION --release $OLDRELEASE --arch $ARCH
checkCmd "ade sysroot latest --distro $DISTRIBUTION --release $OLDRELEASE --arch $ARCH --url "$SYSROOTINDEX""
ade sysroot latest --distro $DISTRIBUTION --release $OLDRELEASE --arch $ARCH
checkCmd "ade sysroot download --distro $DISTRIBUTION --release $OLDRELEASE --arch $ARCH --url "$SYSROOTINDEX" --dest /opt/sysroot/downloads/"
ade sysroot latest --distro $DISTRIBUTION --release $OLDRELEASE --arch $ARCH --url "$SYSROOTINDEX"
checkCmd "ade sysroot verify --file /opt/sysroot/downloads/sysroot-$DISTRIBUTION-$OLDRELEASE-${ARCH}_*.tar.gz"
ade sysroot download --distro $DISTRIBUTION --release $OLDRELEASE --arch $ARCH --url "$SYSROOTINDEX" --dest /opt/sysroot/downloads/
checkCmd "ade sysroot install --file /opt/sysroot/downloads/sysroot-$DISTRIBUTION-$OLDRELEASE-${ARCH}_*.tar.gz"
ade sysroot verify --file /opt/sysroot/downloads/sysroot-$DISTRIBUTION-$OLDRELEASE-${ARCH}_*.tar.gz
checkCmd "ade sysroot list"
ade sysroot install --file /opt/sysroot/downloads/sysroot-$DISTRIBUTION-$OLDRELEASE-${ARCH}_*.tar.gz
checkCmd "cd sample-app"
ade sysroot list
checkCmd "ade configure --debug --sysroot $DISTRIBUTION-$OLDRELEASE-$ARCH -- --disable-Werror"
checkCmd "ade export"
cd sample-app
checkCmd "ls -l *.bundle"
ade configure --debug --sysroot $DISTRIBUTION-$OLDRELEASE-$ARCH -- --disable-Werror
ade export
checkCmd "git clean -fdx"
ls -l *.bundle
echo "TEST_RESULT:pass:ade-tests-custom:"
git clean -fdx
......@@ -29,15 +29,6 @@
set -eux
checkCmd()
{
$1;
if [ $? != 0 ]; then
echo "TEST_RESULT:fail:ade-tests-defaults:$1" >&2
exit 1
fi
}
. /etc/os-release # import $ID and $VERSION_ID
LANG=C.UTF-8
......@@ -45,24 +36,23 @@ DISTRIBUTION=$ID
RELEASE=$VERSION_ID
SAMPLEAGENTREPO=https://gitlab.apertis.org/sample-applications/helloworld-simple-agent/
checkCmd "git clone $SAMPLEAGENTREPO sample-app"
git clone $SAMPLEAGENTREPO sample-app
checkCmd "ade sysroot list"
ade sysroot list
echo ==== Testing ade usage with default settings
checkCmd "ade sysroot installed"
ade sysroot installed
checkCmd "ade sysroot latest"
ade sysroot latest
checkCmd "ade sysroot install"
ade sysroot install
checkCmd "ade sysroot list"
ade sysroot list
checkCmd "cd sample-app"
cd sample-app
checkCmd "ade configure --debug --sysroot $DISTRIBUTION-$RELEASE-armhf"
checkCmd "ade export"
ade configure --debug --sysroot $DISTRIBUTION-$RELEASE-armhf
ade export
checkCmd "ls -l *.bundle"
echo "TEST_RESULT:pass:ade-tests-defaults:"
ls -l *.bundle
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment