[Tizen] Add test package
authorSangwook Kim <swift.kim@samsung.com>
Tue, 28 Apr 2020 08:12:23 +0000 (17:12 +0900)
committer김상욱/Common Platform Lab(SR)/Engineer/삼성전자 <swift.kim@samsung.com>
Thu, 7 May 2020 00:12:34 +0000 (09:12 +0900)
packaging/coreclr-diagnostics.manifest
packaging/coreclr-diagnostics.spec

index 712cb4003ea7060ae522a91e80595b0e40e0e1ed..489914ebc6d38043f3749ea93b15c3f6b6dba747 100755 (executable)
@@ -4,5 +4,6 @@
   </request>
   <assign>
     <filesystem path="/home/owner/share/.dotnet" label="User::App::Shared" type="transmutable" />
+    <filesystem path="/opt/usr/diagnostics-tc" label="User::App::Shared" type="transmutable" />
   </assign>
 </manifest>
index a55ded6911b753b498146c3575804c10180e5cb1..9ee8d7e1ec5672fe1b6adf614e73562c05ef9136 100755 (executable)
@@ -64,14 +64,23 @@ Requires: libunwind
 Requires: libuuid
 
 %description
-This package contains components for basic .NET debugging and diagnostic support.
+This package contains SOS and the SOS plugin for lldb.
 
 %package tools
-Summary:  Diagnostic tools
-Requires: coreclr-diagnostics
+Summary: Diagnostic tools
 
 %description tools
-This package contains a collection of .NET diagnostic tools.
+This package contains various CLI tools for runtime diagnostics.
+
+%ifarch x86_64
+%package test
+Summary: Unit tests
+BuildArch: noarch
+AutoReqProv: no
+
+%description test
+This package contains unit tests for SOS and tools.
+%endif
 
 %prep
 %setup -q -n %{name}-%{version}
@@ -148,6 +157,7 @@ export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/libicu-57.1
 %install
 %define netcoreappdir   %{_datadir}/dotnet/shared/Microsoft.NETCore.App/%{dotnet_version}
 %define toolsdir        /home/owner/share/.dotnet/tools
+%define tcdir           /opt/usr/diagnostics-tc
 
 %ifarch x86_64
 %define rid linux-x64
@@ -182,12 +192,21 @@ for name in counters dump gcdump trace; do
 done
 find %{buildroot}%{toolsdir} -type f -exec chmod 644 {} +
 
-%ifnarch %{ix86}
+%ifarch %{arm}
 for f in $(grep -L "dotnet-" %{buildroot}%{toolsdir}/*.dll); do
   %{_datarootdir}/dotnet.tizen/netcoreapp/crossgen /ReadyToRun /p %{_datarootdir}/dotnet.tizen/netcoreapp:`dirname $f` $f
 done
 %endif
 
+# Tests
+%ifarch x86_64
+mkdir -p %{buildroot}%{tcdir}
+for module in %{_artifacts}/{*.UnitTests,Tracee}; do
+  cp -rf ${module}/%{_buildtype}/netcoreapp*/publish %{buildroot}%{tcdir}/`basename ${module}`
+done
+cp -rf packages/xunit.runner.console/*/tools/netcoreapp2.0 %{buildroot}%{tcdir}/xunit.runner.console
+%endif
+
 %files
 %manifest %{name}.manifest
 %{netcoreappdir}/*
@@ -199,3 +218,10 @@ done
 
 %post tools
 chown -R owner:users /home/owner/share/.dotnet
+
+%ifarch x86_64
+%files test
+%manifest %{name}.manifest
+%dir %{tcdir}
+%{tcdir}/*
+%endif