Skip to content
Snippets Groups Projects
Commit d2a24098 authored by Esben Haabendal's avatar Esben Haabendal
Browse files

Merge branch 'acts-ci' into 'kirkstone'

CI: Run ACTS against QEMU machine

See merge request eclipse/oniro-core/meta-openharmony!104
parents 6c7d9d77 20bf3364
No related branches found
No related tags found
1 merge request!104CI: Run ACTS against QEMU machine
Pipeline #15268 passed
......@@ -367,6 +367,42 @@ ptest:
expire_in: 1 month
when: always
acts:
stage: test
needs:
- job: bitbake-builder
artifacts: false
optional: true
- job: build
artifacts: true
image:
name: $BITBAKE_BUILDER:$BITBAKE_CONTAINER_VERSION
extends: .bitbake
variables:
DISTRO: oniro-openharmony-linux
OPENHARMONY_VERSION: "3.0"
MACHINE: qemuarma7
HDC_CONNECT_ATTEMPTS: 6
HDC_CONNECT_DELAY: 10
ACTS_TESTS: "ActsFaultLoggerTest ActsHiAppEventJsTest ActsHiCollieCppTest ActsHilogTest ActsLibhilogCPPTest ActsLibhilogCTest ActsHiSysEventCPPTest ActsHitraceCPPTest ActsHitraceCTest ActsStartupJSApiTest ActsPowerMgrBatteryTest ActsOsAccountJSApiTest ActsAppdatamagrJsTest ActsDistributedDatamgrJsTest ActsContextTest ActsAmsDataUriUtilsTest ActsAmsZipfileUnzipfileSTest ActsGetWantAllTest ActsFeatureAbilityTest ActsBmsCheckPermissionTest ActsBmsJsTest ActsBmsKitTest ActsBmsModuleUsageRecordTest ActsBundleManagerTest ActsBundleManagerUninstallTest"
script:
- sudo ip tuntap add tap0 mode tap
- sudo ip addr add dev tap0 192.168.7.1/30
- sudo ip link set tap0 up
- bitbake qemu-helper-native
- runqemu publicvnc serialstdio & sleep 130
- ./tmp-*/deploy/sdk/openharmony-tools-*.sh -y -d openharmony-tools
- source ./openharmony-tools/environment-setup-$(uname -m)*
- i=0 ; while [ "$i" -lt $HDC_CONNECT_ATTEMPTS ] ; do
hdc_result="$(hdc tconn 192.168.7.2:35000)" ; echo "hdc:" "$hdc_result" ;
if [[ "$hdc_result" == "Connect OK"* ]] ; then break ; fi ;
sleep $HDC_CONNECT_DELAY ; let i=i+1 ; done ;
if [ "$i" -eq $HDC_CONNECT_ATTEMPTS ] ; then exit 1 ; fi
- xdevice run acts -l $(echo "$ACTS_TESTS"|tr ' ' ';')
artifacts:
paths:
- build/reports
# Build OpenHarmony images using CI runner in China.
#
# Note, you might want to allow the mirror_ch job to complete before running
......
#!/bin/sh
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
#!/bin/sh
# Don't print out kernel messages below warning levels to console
dmesg -n 4
mkdir -p /data/backup
mkdir -p /data/bootchart
......@@ -95,12 +98,16 @@ export XDG_RUNTIME_DIR=/data/weston
export XKB_CONFIG_ROOT=/etc/openharmony/xkb
export XKB_CONFIG_EXTRA_PATH=/etc/openharmony/xkb
STARTUP_CMD_SLEEP=2
STARTUP_CMD_SLEEP=4
# trigger: part of the init process itself
if systemctl -q is-enabled param.service; then
/system/bin/param_service &
sleep "$STARTUP_CMD_SLEEP"
while [ "$(setparam foobar 42)" != "setparam foobar 42 success" ] ; do
echo "param_service not ready"
sleep 1
done
fi
# Explicitly set default value to silence error message about parameter not being set
......@@ -110,6 +117,7 @@ setparam persist.ace.trace.enabled 0
# - init stage
if systemctl -q is-enabled samgr.service; then
echo >/dev/console "Starting OpenHarmony samgr service"
/system/bin/samgr &
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -142,6 +150,7 @@ fi
# "exec /system/bin/udevadm trigger",
# "exec /system/bin/udevadm settle --timeout=30"
if systemctl -q is-enabled weston.service; then
echo >/dev/console "Starting weston"
/system/bin/weston -c /system/etc/weston.ini -B drm-backend.so --tty=1 --use-pixman &
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -153,6 +162,7 @@ fi
# "uid" : "root",
# "gid" : ["root"]
if systemctl -q is-enabled installs.service; then
echo >/dev/console "Starting OpenHarmony installs service"
/system/bin/installs & # saId 511
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -164,6 +174,7 @@ fi
# "uid" : "root",
# "gid" : ["root"]
if systemctl -q is-enabled appspawn.service; then
echo >/dev/console "Starting OpenHarmony appspawn service"
/system/bin/appspawn & # SA: 1401 180 3703 3008
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -178,6 +189,7 @@ fi
# "hilogControl seqpacket 0600 logd logd false"
# ]
if systemctl -q is-enabled hilogd.service; then
echo >/dev/console "Starting OpenHarmony hilogd service"
/system/bin/hilogd &
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -188,6 +200,7 @@ fi
# "uid" : "system",
# "gid" : ["system", "shell"]
if systemctl -q is-enabled huks.service; then
echo >/dev/console "Starting OpenHarmony huks service"
su system -c '/system/bin/sa_main /system/profile/huks_service.xml &' # SA: 3510
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -198,6 +211,7 @@ fi
# "uid" : "system",
# "gid" : ["system", "shell"]
if systemctl -q is-enabled deviceauth.service; then
echo >/dev/console "Starting OpenHarmony deviceauth service"
su system -c '/system/bin/deviceauth_service &' # SA: 4701 | Required SA: 3510
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -213,6 +227,7 @@ fi
# "/dev/blkio/foreground/tasks"
# ]
if systemctl -q is-enabled accountmgr.service; then
echo >/dev/console "Starting OpenHarmony accountmgr service"
su system -c '/system/bin/sa_main /system/profile/accountmgr.xml &' # SA: 200
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -223,6 +238,7 @@ fi
# "uid" : "system",
# "gid" : ["system", "shell"]
if systemctl -q is-enabled dsoftbus.service; then
echo >/dev/console "Starting OpenHarmony dsoftbus service"
su system -c '/system/bin/sa_main /system/profile/softbus_server.xml &' # SA: 1401 4700 | Required SA: 3299
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -237,6 +253,7 @@ fi
# "uid" : "system",
# "gid" : ["system", "shell"]
if systemctl -q is-enabled distributedsched.service; then
echo >/dev/console "Starting OpenHarmony distributedsched service"
su system -c '/system/bin/sa_main /system/profile/distributedsched.xml &' # SA: 1401
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -253,6 +270,7 @@ fi
# "/dev/blkio/foreground/tasks"
# ]
if systemctl -q is-enabled distributed_data.service; then
echo >/dev/console "Starting OpenHarmony distributeddata service"
su system -c '/system/bin/sa_main /system/profile/distributeddata.xml &' # SA: 1301
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -264,6 +282,7 @@ fi
# "gid" : ["system", "shell"],
# "caps" : ["SYS_TIME", "WAKE_ALARM"]
if systemctl -q is-enabled time.service; then
echo >/dev/console "Starting OpenHarmony time service"
su system -c '/system/bin/sa_main /system/profile/time_service.xml &' # SA: 1401 180 3702
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -276,6 +295,7 @@ fi
# "gid" : ["system"],
# "caps" : ["SYS_PTRACE", "KILL"]
if systemctl -q is-enabled foundation.service; then
echo >/dev/console "Starting OpenHarmony foundation service"
su system -c '/system/bin/sa_main /system/profile/foundation.xml &' # SA: 180 182 3203 3299 3301 3308 3501 4010 | Required SA: 4700
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -286,6 +306,7 @@ fi
# "uid" : "system",
# "gid" : ["media_rw", "system"]
if systemctl -q is-enabled media.service; then
echo >/dev/console "Starting OpenHarmony media service"
su system -c '/system/bin/sa_main /system/profile/media_service.xml &'
sleep "$STARTUP_CMD_SLEEP"
fi
......@@ -297,10 +318,17 @@ fi
# "gid" : ["system", "shell"],
# "caps" : ["SYS_TIME"]
if systemctl -q is-enabled inputmethod.service; then
echo >/dev/console "Starting OpenHarmony inputmethod service"
su system -c '/system/bin/sa_main /system/profile/inputmethod_service.xml &' # SA: 180 1401 3703
sleep "$STARTUP_CMD_SLEEP"
fi
if systemctl -q is-enabled faultloggerd.service; then
echo >/dev/console "Starting OpenHarmony faultlogger service"
setparam ro.logsystem.usertype 6 # UserType::OVERSEAS_COMMERCIAL
/system/bin/faultloggerd &
fi
# trigger: boot?
# "name" : "hdcd",
# "path" : ["/system/bin/hdcd"],
......@@ -309,15 +337,12 @@ fi
# ],
# "disabled" : 1
if systemctl -q is-enabled hdcd.service; then
echo >/dev/console "Starting OpenHarmony hdcd service"
setparam persist.hdc.port 35000
setparam persist.hdc.root 1 # We are running hdcd as root
setparam ro.hdc.secure 0 # Do not enable secure mode
sleep "$STARTUP_CMD_SLEEP"
/system/bin/hdcd -t &
fi
if systemctl -q is-enabled faultloggerd.service; then
setparam ro.logsystem.usertype 6 # UserType::OVERSEAS_COMMERCIAL
/system/bin/faultloggerd &
fi
echo "All OpenHarmony services started" >/dev/console
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment