[Tizen] Build corefx-test as arch dependent
authorGleb Balykov <g.balykov@samsung.com>
Tue, 4 Oct 2022 09:15:10 +0000 (12:15 +0300)
committer이형주/Common Platform Lab(SR)/삼성전자 <leee.lee@samsung.com>
Tue, 4 Oct 2022 10:07:24 +0000 (19:07 +0900)
packaging/coreclr.spec

index 4827e44..d65cfa3 100755 (executable)
@@ -1,5 +1,6 @@
 %{!?dotnet_buildtype: %define dotnet_buildtype Release}
 %{!?skiptests: %define skiptests 1}
+%{!?skipfxtests: %define skipfxtests 1}
 
 %define dotnet_buildtype_clr %{dotnet_buildtype}
 %define dotnet_buildtype_fx %{dotnet_buildtype}
@@ -22,6 +23,7 @@
 %ifarch %{arm} aarch64 %{ix86} x86_64
 %else
 %define skiptests 1
+%define skipfxtests 1
 %endif
 
 %define pgo_instrument 0
@@ -170,12 +172,12 @@ AutoReqProv: no
 %description -n corefx-managed-ref
 The managed part (.dll) of dotnet core foundational class libraries for developer
 
-%ifarch x86_64
+%if 0%{skipfxtests}
+%else
 %package -n corefx-test
 Summary:       Dotnet Libraries Unit Test
 Requires:   corefx-native
 Requires:   corefx-managed
-BuildArch: noarch
 AutoReqProv: no
 
 %description -n corefx-test
@@ -246,9 +248,7 @@ BASE_FLAGS=" --target=%{_host} "
 
 
 %ifarch x86_64
-# Even though build architectur is x86_64, it will be running on arm board.
-# So we need to pass the arch argument as arm.
-%define _barch  %{?cross:%{cross}}%{!?cross:x64}
+%define _barch  x64
 %endif
 
 %ifarch aarch64
@@ -354,8 +354,9 @@ export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/libicu-57.1/
 ./build.sh %{_build_args} --subset clr.tools /p:UseSharedCompilation=false
 %endif
 
-%ifarch x86_64
-# Build CoreFX managed tests, which are reused for all arches
+%if 0%{skipfxtests}
+%else
+# Build CoreFX managed tests, which are arch specific
 ./build.sh %{_build_args} --subset libs.pretest+libs.tests --testscope all /p:DisableImplicitFSharpCoreReference=true /p:UseSharedCompilation=false
 %endif
 %endif
@@ -492,7 +493,8 @@ cp %{_reldir_fx_managed}/*.dll %{buildroot}%{_datadir}/%{netcoreappdir}
 cp %{_reldir_fx_managed}/*.pdb %{buildroot}%{_datadir}/%{netcoreappdir}
 
 # Copy files for test rpm
-%ifarch x86_64
+%if 0%{skipfxtests}
+%else
 
 mkdir artifacts/corefx_tests
 mkdir artifacts/corefx_tests/tests
@@ -743,7 +745,8 @@ cp ./nuget/*.nupkg %{buildroot}/nuget
 %{_datadir}/%{netcoreappdir}/*.pdb
 %exclude %{_datadir}/%{netcoreappdir}/System.Private.CoreLib.pdb
 
-%ifarch x86_64
+%if 0%{skipfxtests}
+%else
 %files -n corefx-test
 %manifest %{name}.manifest
 %{fxtestdir}/tests