diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2017-02-20 19:41:03 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2017-03-31 12:01:38 +0900 |
commit | 5e74ae345076b961991aa48acff639f359d7b4e7 (patch) | |
tree | d9e57c139b8c4d82b1b092d640861437c440615c | |
parent | 9ea8b997f85523b703f50ad141cd0fe40926cff7 (diff) | |
download | corefx-accepted/tizen_tv.tar.gz corefx-accepted/tizen_tv.tar.bz2 corefx-accepted/tizen_tv.zip |
Enable CoreFX Test buildsubmit/tizen/20170331.061541accepted/tizen/unified/20170331.083436accepted/tizen/tv/20170331.083139accepted/tizen/mobile/20170331.083318accepted/tizen/ivi/20170331.083219accepted/tizen/common/20170331.152748accepted/tizen_tvaccepted/tizen_mobileaccepted/tizen_iviaccepted/tizen_common
Change-Id: Id64b2df05d085831c32b08b73c4c19d778ffe668
Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
-rw-r--r-- | packaging/Fix-run-test.sh-16170.patch | 284 | ||||
-rw-r--r-- | packaging/NETCore.App.1.0.0.tar.gz | bin | 712079 -> 0 bytes | |||
-rw-r--r-- | packaging/corefx.spec | 25 | ||||
-rw-r--r-- | packaging/runtime.tar.gz | bin | 0 -> 22045501 bytes |
4 files changed, 308 insertions, 1 deletions
diff --git a/packaging/Fix-run-test.sh-16170.patch b/packaging/Fix-run-test.sh-16170.patch new file mode 100644 index 0000000000..d4ed9c904d --- /dev/null +++ b/packaging/Fix-run-test.sh-16170.patch @@ -0,0 +1,284 @@ +From b55af9c8ed4bc07ae950aaf245dde965af7ebb75 Mon Sep 17 00:00:00 2001 +From: Hyeongseok Oh <hseok82.oh@samsung.com> +Date: Thu, 16 Feb 2017 06:22:52 +0900 +Subject: [PATCH] Fix run-test.sh (#16170) + +* Fix run-test.sh + +This makes run-test.sh work in x64/linux. +Remove useless argument and add --runtime argument to pass runtime directory + +Not works in cross compile yet (ex. build in x64 & run in arm) + +* Fix run-test.sh + +remove chmod and check RunTests.sh existing +--- + run-test.sh | 170 +++++++++++++++++++++--------------------------------------- + 1 file changed, 60 insertions(+), 110 deletions(-) + +diff --git a/run-test.sh b/run-test.sh +index 16d95dc..b7baa8c 100755 +--- a/run-test.sh ++++ b/run-test.sh +@@ -19,25 +19,17 @@ usage() + echo "usage: run-test [options]" + echo + echo "Input sources:" +- echo " --coreclr-bins <location> Location of root of the binaries directory" +- echo " containing the FreeBSD, Linux, NetBSD or OSX coreclr build" +- echo " default: <repo_root>/bin/Product/<OS>.x64.<ConfigurationGroup>" +- echo " --corefx-tests <location> Location of the root binaries location containing" +- echo " the tests to run" +- echo " default: <repo_root>/bin/tests" +- echo " --corefx-native-bins <location> Location of the FreeBSD, Linux, NetBSD or OSX native corefx binaries" +- echo " default: <repo_root>/bin/<OS>.x64.<ConfigurationGroup>" +- echo " --corefx-packages <location> Location of the packages restored from NuGet." +- echo " default: <repo_root>/packages" +- echo " --testRelPath <path> Relative path to test script" +- echo " Path is relative from the directory specified by project name" +- echo " default: default.netcoreapp1.1" ++ echo " --runtime <location> Location of root of the binaries directory" ++ echo " containing the FreeBSD, Linux, NetBSD or OSX runtime" ++ echo " default: <repo_root>/bin/testhost/netcoreapp-<OS>-<ConfigurationGroup>-<Arch>" + echo +- echo "Flavor/OS options:" ++ echo "Flavor/OS/Architecture options:" + echo " --configurationGroup <config> ConfigurationGroup to run (Debug/Release)" + echo " default: Debug" + echo " --os <os> OS to run (FreeBSD, Linux, NetBSD or OSX)" + echo " default: detect current OS" ++ echo " --arch <Architecture> Architecture to run (x64, arm, x86, arm64)" ++ echo " default: detect current architecture" + echo + echo "Execution options:" + echo " --sequential Run tests sequentially (default is to run in parallel)." +@@ -99,48 +91,49 @@ case $OSName in + OS=Linux + ;; + esac ++ ++# Use uname to determine what the CPU is. ++CPUName=$(uname -p) ++# Some Linux platforms report unknown for platform, but the arch for machine. ++if [ "$CPUName" == "unknown" ]; then ++ CPUName=$(uname -m) ++fi ++ ++case $CPUName in ++ i686) ++ echo "Unsupported CPU $CPUName detected, test might not succeed!" ++ __Arch=x86 ++ ;; ++ ++ x86_64) ++ __Arch=x64 ++ ;; ++ ++ armv7l) ++ __Arch=arm ++ ;; ++ ++ aarch64) ++ __Arch=arm64 ++ ;; ++ ++ *) ++ echo "Unknown CPU $CPUName detected, configuring as if for x64" ++ __Arch=x64 ++ ;; ++esac ++ + # Misc defaults + TestSelection=".*" + TestsFailed=0 + +-# TestRelPath default +-TestRelPath="default.netcoreapp1.1" +- + ensure_binaries_are_present() + { +- local LowerConfigurationGroup="$(echo $ConfigurationGroup | awk '{print tolower($0)}')" +- +- # Copy the CoreCLR native binaries +- if [ ! -d $CoreClrBins ] ++ if [ ! -d $Runtime ] + then +- echo "error: Coreclr $OS binaries not found at $CoreClrBins" ++ echo "error: Coreclr $OS binaries not found at $Runtime" + exit 1 + fi +- +- # Then the native CoreFX binaries +- if [ ! -d $CoreFxNativeBins ] +- then +- echo "error: Corefx native binaries should be built (use build.sh native in root)" +- exit 1 +- fi +-} +- +-copy_test_overlay() +-{ +- testDir=$1 +- +- link_files_in_directory "$CoreClrBins" "$testDir" +- link_files_in_directory "$CoreFxNativeBins" "$testDir" +-} +- +-# $1 is the source directory +-# $2 is the destination directory +-link_files_in_directory() +-{ +- for path in `find $1 -maxdepth 1 -type f`; do +- fileName=`basename $path` +- ln -f $path "$2/$fileName" +- done + } + + # $1 is the path of list file +@@ -166,7 +159,7 @@ run_selected_tests() + selectedTests[${#selectedTests[@]}]="$TestDir" + fi + +- run_all_tests ${selectedTests[@]/#/$CoreFxTests/} ++ run_all_tests ${selectedTests[@]} + } + + # $1 is the name of the platform folder (e.g Unix.AnyCPU.Debug) +@@ -201,25 +194,28 @@ run_test() + exit 0 + fi + +- dirName="$1/$TestRelPath" ++ dirName="$1/netcoreapp" + + if [ ! -d "$dirName" ]; then +- echo "Nothing to test in $testProject" +- exit 0 ++ dirName="$1/netstandard" ++ if [ ! -d "$dirName" ]; then ++ echo "Nothing to test in $testProject" ++ return ++ fi + fi + +- copy_test_overlay $dirName ++ if [ ! -e "$dirName/RunTests.sh" ]; then ++ echo "Cannot find $dirName/RunTests.sh" ++ return ++ fi + + pushd $dirName > /dev/null + +- chmod +x ./RunTests.sh +- chmod +x ./corerun +- + echo + echo "Running tests in $dirName" +- echo "./RunTests.sh $CoreFxPackages" ++ echo "./RunTests.sh $Runtime" + echo +- ./RunTests.sh "$CoreFxPackages" ++ ./RunTests.sh "$Runtime" + exitCode=$? + + if [ $exitCode -ne 0 ] +@@ -294,17 +290,8 @@ do + -h|--help) + usage + ;; +- --coreclr-bins) +- CoreClrBins=$2 +- ;; +- --corefx-tests) +- CoreFxTests=$2 +- ;; +- --corefx-native-bins) +- CoreFxNativeBins=$2 +- ;; +- --corefx-packages) +- CoreFxPackages=$2 ++ --runtime) ++ Runtime=$2 + ;; + --restrict-proj) + TestSelection=$2 +@@ -336,9 +323,6 @@ do + --test-dir-file) + TestDirFile=$2 + ;; +- --testRelPath) +- TestRelPath=$2 +- ;; + --outerloop) + OuterLoop="" + ;; +@@ -353,24 +337,9 @@ done + + # Compute paths to the binaries if they haven't already been computed + +-if [ "$CoreClrBins" == "" ] +-then +- CoreClrBins="$ProjectRoot/bin/Product/$OS.x64.$ConfigurationGroup" +-fi +- +-if [ "$CoreFxTests" == "" ] +-then +- CoreFxTests="$ProjectRoot/bin/tests" +-fi +- +-if [ "$CoreFxNativeBins" == "" ] +-then +- CoreFxNativeBins="$ProjectRoot/bin/$OS.x64.$ConfigurationGroup/native" +-fi +- +-if [ "$CoreFxPackages" == "" ] ++if [ "$Runtime" == "" ] + then +- CoreFxPackages="$ProjectRoot/packages" ++ Runtime="$ProjectRoot/bin/testhost/netcoreapp-$OS-$ConfigurationGroup-$__Arch" + fi + + # Check parameters up front for valid values: +@@ -387,25 +356,6 @@ then + exit 1 + fi + +-if [ "$CoreClrObjs" == "" ] +-then +- CoreClrObjs="$ProjectRoot/bin/obj/$OS.x64.$ConfigurationGroup" +-fi +- +-# The CI system shares PR build job definitions between RC2 and master. In RC2, we expected +-# that CoreFxTests was the path to the root folder containing the tests for a specific platform +-# (since all tests were rooted under a path like tests/Linux.AnyCPU.$ConfigurationGroup). In +-# master, we instead want CoreFxTests to point at the root of the tests folder, since tests +-# are now split across tests/AnyOS.AnyCPU.$ConfigruationGroup, +-# tests/Unix.AnyCPU.$ConfigruationGroup and tests/$OS.AnyCPU.$ConfigurationGroup. +-# +-# Until we can split the CI definitions up, we need them to pass a platform specific folder (so +-# the jobs work on RC2), so here we detect that case and use the parent folder instead. +-if [[ `basename $CoreFxTests` =~ ^(Linux|OSX|FreeBSD|NetBSD) ]] +-then +- CoreFxTests=`dirname $CoreFxTests` +-fi +- + export CORECLR_SERVER_GC="$serverGC" + export PAL_OUTPUTDEBUGSTRING="1" + +@@ -436,9 +386,9 @@ if [ -n "$TestDirFile" ] || [ -n "$TestDir" ] + then + run_selected_tests + else +- run_all_tests "$CoreFxTests/AnyOS.AnyCPU.$ConfigurationGroup/"* +- run_all_tests "$CoreFxTests/Unix.AnyCPU.$ConfigurationGroup/"* +- run_all_tests "$CoreFxTests/$OS.AnyCPU.$ConfigurationGroup/"* ++ run_all_tests "$ProjectRoot/bin/AnyOS.AnyCPU.$ConfigurationGroup/"*.Tests ++ run_all_tests "$ProjectRoot/bin/Unix.AnyCPU.$ConfigurationGroup/"*.Tests ++ run_all_tests "$ProjectRoot/bin/$OS.AnyCPU.$ConfigurationGroup/"*.Tests + fi + + if [ "$CoreClrCoverage" == "ON" ] +-- +1.9.1 + diff --git a/packaging/NETCore.App.1.0.0.tar.gz b/packaging/NETCore.App.1.0.0.tar.gz Binary files differdeleted file mode 100644 index 392da83932..0000000000 --- a/packaging/NETCore.App.1.0.0.tar.gz +++ /dev/null diff --git a/packaging/corefx.spec b/packaging/corefx.spec index 67dcdc1d5d..b6c66e5467 100644 --- a/packaging/corefx.spec +++ b/packaging/corefx.spec @@ -3,6 +3,7 @@ %define dotnet_buildtype Debug %endif %define _binaries_in_noarch_packages_terminate_build 0 +%define _unpackaged_files_terminate_build 0 %ifarch x86_64 %define skipnative 0 @@ -36,9 +37,11 @@ Source1001: %{name}.manifest Source1002: libicu.tar.gz Source1003: dep_libs.tar.gz Source1004: runtime_nupkgs.tar.gz -# Gbp-Ignore-Patches: 0 1 +Source1005: runtime.tar.gz +# Gbp-Ignore-Patches: 0 1 2 patch0: Add-project.lock.json-files.patch patch1: Do-not-use-test-runtime.depproj-and-dotnet-myget-sou.patch +patch2: Fix-run-test.sh-16170.patch %if 0%{skipnative} && 0%{skipmanaged} %else @@ -134,9 +137,11 @@ cp %{SOURCE1001} . # Gbp-Patch-Macros %patch0 -p1 %patch1 -p1 +%patch2 -p1 cp %{SOURCE1000} ./ tar xf %{SOURCE1000} %setup -T -D -a 1004 +%setup -T -D -a 1005 %ifarch armv7l %setup -T -D -a 1002 %setup -T -D -a 1003 @@ -228,6 +233,9 @@ export CXXFLAGS="${CXXFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp %else # Build managed only. ./build-managed.sh -%{buildtype} -RestoreDuringBuild=false -RuntimeOS=ubuntu.14.04 -- /p:IncludeBuildNumberInPackageVersion=true + +# Build test +./build-tests.sh -%{buildtype} -Outerloop -SkipTests %endif echo %{COREFX_GIT_HASH} > .fxinfo @@ -243,6 +251,10 @@ mkdir -p %{buildroot}%{_datadir}/%{netcoreappdir} %define tizennetdir tizen.net mkdir -p %{buildroot}%{_datadir}/%{tizennetdir} +# TC directory +%define tcdir corefx-tc +mkdir -p %{buildroot}/opt/usr/%{tcdir} + %if 0%{skipnative} %else cp %{_reldir}/native/System.Native.a %{buildroot}%{_datadir}/%{netcoreappdir} @@ -316,6 +328,15 @@ done for name in `find %{buildroot}%{_datadir}/%{netcoreappdir} -iname '*.dll' -exec basename {} \;`; do ln -sf ../%{netcoreappdir}/"${name}" %{buildroot}%{_datadir}/%{tizennetdir}/ done + +### +### Copy Tests directory +### +for name in `find ./bin -type d -name "*.Tests" -not -path "*/obj/*"`; do + cp "${name}" %{buildroot}/opt/usr/%{tcdir} --parents -rf +done +cp ./bin/testhost %{buildroot}/opt/usr/%{tcdir} --parents -rf +cp ./bin/runtime %{buildroot}/opt/usr/%{tcdir} --parents -rf %endif ### @@ -349,6 +370,8 @@ native -p /sbin/ldconfig %{_datadir}/%{tizennetdir}/*.dll %files test +%manifest %{name}.manifest +/opt/usr/%{tcdir}/* %endif %files managed-ref diff --git a/packaging/runtime.tar.gz b/packaging/runtime.tar.gz Binary files differnew file mode 100644 index 0000000000..f228283a28 --- /dev/null +++ b/packaging/runtime.tar.gz |