summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/system-plugin.spec28
-rw-r--r--tests/system-test33
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