Add packages that runs auto-tests of systemfw 70/265670/4
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 27 Oct 2021 01:06:07 +0000 (18:06 -0700)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 27 Oct 2021 03:24:24 +0000 (20:24 -0700)
The package system-plugin-tests contains testsuites throughout the
system framework and has scripts to run those tests.

Change-Id: Ic0e5396f1325560735c4d346496398402c9ecbf9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
packaging/system-plugin.spec
tests/system-test [new file with mode: 0644]

index 0246abd..48ad168 100644 (file)
@@ -119,6 +119,17 @@ BuildArch: noarch
 %description config-3parts-lzuser
 This package provides configuration files for storage partitions
 
+%package system-tests
+Summary: System testsuite
+BuildRequires: deviced-auto-test
+BuildRequires: feedbackd-auto-test
+BuildRequires: storaged-auto-test
+BuildRequires: hal-api-device-haltests
+Requires: capi-system-info-tool
+
+%description system-tests
+This package provides system testsuites
+
 %prep
 %setup -q
 cp %{SOURCE1} .
@@ -208,6 +219,14 @@ mkdir -p %{buildroot}%{_userunitdir}/basic.target.wants
 install -m 644 units/session-bind.service %{buildroot}%{_userunitdir}
 ln -s ../session-bind.service %{buildroot}%{_userunitdir}/basic.target.wants/session-bind.service
 
+# test
+mkdir -p %{buildroot}%{_bindir}/hal
+install -m 755 tests/system-test %{buildroot}%{_bindir}
+cp %{_bindir}/deviced-auto-test %{buildroot}%{_bindir}
+cp %{_bindir}/feedbackd-auto-test %{buildroot}%{_bindir}
+cp %{_bindir}/storaged-auto-test %{buildroot}%{_bindir}
+cp %{_bindir}/hal/device-haltests %{buildroot}%{_bindir}/hal
+
 %clean
 rm -rf %{buildroot}
 
@@ -338,3 +357,12 @@ echo ""
 %{_unitdir}/local-fs.target.wants/opt-usr.mount
 %{_userunitdir}/wait-mount@.service
 %{_userunitdir}/basic.target.wants/wait-mount@opt-usr.service
+
+%files system-tests
+%defattr(755,root,root,-)
+%manifest %{name}.manifest
+%{_bindir}/system-test
+%{_bindir}/deviced-auto-test
+%{_bindir}/feedbackd-auto-test
+%{_bindir}/storaged-auto-test
+%{_bindir}/hal/device-haltests
diff --git a/tests/system-test b/tests/system-test
new file mode 100644 (file)
index 0000000..6b4d6ae
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# deviced-auto-test
+PROFILE=$(system-info-tool -g tizen.org/feature/profile)
+PROFILE=${PROFILE#*value=}
+
+FEATURE_BATTERY=$(system-info-tool -g tizen.org/feature/battery)
+FEATURE_BATTERY=${FEATURE_BATTERY#*value=}
+if [ $FEATURE_BATTERY == 1 ]; then
+       dlogutil -c
+       dlogutil AUTO_TEST > /proc/self/fd/2 &
+       deviced-auto-test ${PROFILE} battery
+       kill %1
+fi
+
+# feedbackd-auto-test
+FEATURE_VIBRATION=$(system-info-tool -g tizen.org/feature/feedback.vibration)
+FEATURE_VIBRATION=${FEATURE_VIBRATION#*value=}
+if [ $FEATURE_VIBRATION == 1 ]; then
+       dlogutil -c
+       dlogutil FEEDBACKD > /proc/self/fd/2 &
+       feedbackd-auto-test
+       kill %1
+fi
+
+# storaged-auto-test
+dlogutil -c
+dlogutil STORAGED > /proc/self/fd/2 &
+storaged-auto-test
+kill %1
+
+# haltest
+/bin/hal/device-haltests