Commit c5d7d2d 1 parent cc47dfb commit c5d7d2d Copy full SHA for c5d7d2d
File tree 2 files changed +72
-0
lines changed
automated/linux/aklite-apps
2 files changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash -e
2
+ # SPDX-License-Identifier: GPL-2.0-only
3
+ # Copyright (C) 2024 Foundries.io Ltd.
4
+
5
+ # shellcheck disable=SC1091
6
+ . ../../lib/sh-test-lib
7
+ OUTPUT=" $( pwd) /output"
8
+ RESULT_FILE=" ${OUTPUT} /result.txt"
9
+ export RESULT_FILE
10
+ DEFAULT_APPS=" "
11
+
12
+ usage () {
13
+ echo " \
14
+ Usage: $0 -d <app1,app2>
15
+
16
+ -d <app1,app2>
17
+ Comma separated list of default apps to start
18
+ "
19
+ }
20
+
21
+ while getopts " d:h" opts; do
22
+ case " $opts " in
23
+ d) DEFAULT_APPS=" ${OPTARG} " ;;
24
+ h|* ) usage ; exit 1 ;;
25
+ esac
26
+ done
27
+
28
+
29
+ ! check_root && error_msg " You need to be root to run this script."
30
+ create_out_dir " ${OUTPUT} "
31
+
32
+ systemctl enable --now compose-apps-early-start
33
+ check_return " compose-apps-early-start"
34
+
35
+ if [ -n " ${DEFAULT_APPS} " ]; then
36
+ IFS=" ,"
37
+ for app in ${DEFAULT_APPS}
38
+ do
39
+ docker ps | grep " ${app} "
40
+ check_return " ${app} -running"
41
+ done
42
+ else
43
+ report-skip " early-start-apps"
44
+ fi
Original file line number Diff line number Diff line change
1
+ # SPDX-License-Identifier: GPL-2.0-only
2
+ # Copyright (C) 2024 Foundries.io
3
+ metadata :
4
+ format : Lava-Test Test Definition 1.0
5
+ name : apps-early-start
6
+ description : " Run apps without registration using systemd
7
+ Setting DEFAULT_APPS tells the script which docker-compose
8
+ apps should be running."
9
+
10
+ maintainer :
11
+ - milosz.wasilewski@foundries.io
12
+ os :
13
+ - openembedded
14
+ scope :
15
+ - functional
16
+
17
+ devices :
18
+ - imx8mm
19
+ - bcm2711-rpi-4-b
20
+
21
+ params :
22
+ DEFAULT_APPS : " "
23
+
24
+ run :
25
+ steps :
26
+ - cd ./automated/linux/aklite-apps
27
+ - ./apps-early-start.sh -d "${DEFAULT_APPS}"
28
+ - ../../utils/send-to-lava.sh ./output/result.txt
You can’t perform that action at this time.
0 commit comments