Commit cc47dfb 1 parent e8874f8 commit cc47dfb Copy full SHA for cc47dfb
File tree 2 files changed +95
-0
lines changed
automated/linux/aklite-apps
2 files changed +95
-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
+ APPS=" "
11
+ DEFAULT_APPS=" "
12
+ LOOP_APPS=" "
13
+ APPS_ARG=" "
14
+
15
+ usage () {
16
+ echo " \
17
+ Usage: $0 -a <app1,app2> -d <app1,app2>
18
+
19
+ -a <app1,app2>
20
+ Comma separated list of apps to start
21
+ -d <app1,app2>
22
+ Comma separated list of default apps to start
23
+ This option is ignored when -a is used.
24
+ When using -d without -a script calls 'aklite-apps run'
25
+ without any parameters.
26
+ "
27
+ }
28
+
29
+ while getopts " a:d:h" opts; do
30
+ case " $opts " in
31
+ a) APPS=" ${OPTARG} " ;;
32
+ d) DEFAULT_APPS=" ${OPTARG} " ;;
33
+ h|* ) usage ; exit 1 ;;
34
+ esac
35
+ done
36
+
37
+
38
+ ! check_root && error_msg " You need to be root to run this script."
39
+ create_out_dir " ${OUTPUT} "
40
+
41
+ if [ -n " ${APPS} " ]; then
42
+ APPS_ARG=" --apps ${APPS} "
43
+ LOOP_APPS=" ${APPS} "
44
+ elif [ -n " ${DEFAULT_APPS} " ]; then
45
+ LOOP_APPS=" ${DEFAULT_APPS} "
46
+ else
47
+ error_msg " List of apps to check missing"
48
+ fi
49
+
50
+ # shellcheck disable=SC2086
51
+ aklite-apps run ${APPS_ARG}
52
+
53
+ # LOOP_APPS can't be empty at this point
54
+ IFS=" ,"
55
+ for app in ${LOOP_APPS}
56
+ do
57
+ docker ps | grep " ${app} "
58
+ check_return " ${app} -running"
59
+ done
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 : aklite-apps
6
+ description : " Run apps without registration
7
+ The test checks if docker-compose apps can be started
8
+ with 'aklite-apps'.
9
+ When using APPS parameter the script will run
10
+
11
+ aklite-apps run --apps ${APPS}
12
+
13
+ When using DEFAULT_APPS the script will run
14
+
15
+ aklite-apps run"
16
+
17
+ maintainer :
18
+ - milosz.wasilewski@foundries.io
19
+ os :
20
+ - openembedded
21
+ scope :
22
+ - functional
23
+
24
+ devices :
25
+ - imx8mm
26
+ - bcm2711-rpi-4-b
27
+
28
+ params :
29
+ APPS : " "
30
+ DEFAULT_APPS : " "
31
+
32
+ run :
33
+ steps :
34
+ - cd ./automated/linux/aklite-apps
35
+ - ./aklite-apps.sh -a "${APPS}" -d "${DEFAULT_APPS}"
36
+ - ../../utils/send-to-lava.sh ./output/result.txt
You can’t perform that action at this time.
0 commit comments