diff options
author | Youngjae Cho <y0.cho@samsung.com> | 2021-10-26 18:06:07 -0700 |
---|---|---|
committer | Youngjae Cho <y0.cho@samsung.com> | 2021-10-26 20:24:24 -0700 |
commit | 1e2e72787c516e98b2af2e3aa31b358af0e62b7f (patch) | |
tree | 0e4a08f4e50d5fdcdef1fbfd5de49779ba2cbb31 | |
parent | b841fa44f9b93b99124218adbec38ded2d5ac745 (diff) | |
download | system-plugin-1e2e72787c516e98b2af2e3aa31b358af0e62b7f.tar.gz system-plugin-1e2e72787c516e98b2af2e3aa31b358af0e62b7f.tar.bz2 system-plugin-1e2e72787c516e98b2af2e3aa31b358af0e62b7f.zip |
Add packages that runs auto-tests of systemfw
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>
-rw-r--r-- | packaging/system-plugin.spec | 28 | ||||
-rw-r--r-- | tests/system-test | 33 |
2 files changed, 61 insertions, 0 deletions
diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec index 0246abd..48ad168 100644 --- a/packaging/system-plugin.spec +++ b/packaging/system-plugin.spec @@ -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 index 0000000..6b4d6ae --- /dev/null +++ b/tests/system-test @@ -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 |