From: Sangwook Kim Date: Tue, 28 Apr 2020 08:12:23 +0000 (+0900) Subject: [Tizen] Add test package X-Git-Tag: submit/tizen/20200529.025830~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1026e20e841d20fad97914dce127c1d1a0a5a9ff;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git [Tizen] Add test package --- diff --git a/packaging/coreclr-diagnostics.manifest b/packaging/coreclr-diagnostics.manifest index 712cb4003..489914ebc 100755 --- a/packaging/coreclr-diagnostics.manifest +++ b/packaging/coreclr-diagnostics.manifest @@ -4,5 +4,6 @@ + diff --git a/packaging/coreclr-diagnostics.spec b/packaging/coreclr-diagnostics.spec index a55ded691..9ee8d7e1e 100755 --- a/packaging/coreclr-diagnostics.spec +++ b/packaging/coreclr-diagnostics.spec @@ -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