diff options
Diffstat (limited to 'tests/runtest.sh')
-rwxr-xr-x | tests/runtest.sh | 49 |
1 files changed, 16 insertions, 33 deletions
diff --git a/tests/runtest.sh b/tests/runtest.sh index 11c720264..43d401ba4 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -16,37 +16,27 @@ runtest() __SourceFolder=$1 __SourceFileName=$2 __SourceFile=${__SourceFolder}/${__SourceFileName} - ${__SourceFile}.sh $1/bin/${CoreRT_BuildType}/dnxcore50/${__BuildRid}/native $2 + ${__SourceFile}.sh $1/bin/${CoreRT_BuildType}/native $2 return $? } -restore() -{ - ${CoreRT_CliBinDir}/dotnet restore --quiet $1 --source "https://dotnet.myget.org/F/dotnet-core" -} - -compiletest() -{ - echo "Compiling dir $1 with dotnet build $2" - rm -rf $1/bin $1/obj - ${CoreRT_CliBinDir}/dotnet build --runtime ${__BuildRid} --native -c ${CoreRT_BuildType} --ilcpath ${CoreRT_ToolchainDir} --appdepsdkpath ${CoreRT_AppDepSdkDir} $1 $2 -} - run_test_dir() { local __test_dir=$1 - local __restore=$2 - local __mode=$3 + local __mode=$2 local __dir_path=`dirname ${__test_dir}` local __filename=`basename ${__dir_path}` - if [ ${__restore} == 1 ]; then - restore ${__dir_path} - fi - local __compile_args="" + local __extra_args="" if [ "${__mode}" = "Cpp" ]; then - __compile_args="--cpp" + __extra_args="${__extra_args} /p:NativeCodeGen=cpp" fi - compiletest ${__dir_path} ${__compile_args} + + rm -rf ${__dir_path}/bin ${__dir_path}/obj + + local __msbuild_dir=${CoreRT_TestRoot}/../Tools + echo ${__msbuild_dir}/corerun ${__msbuild_dir}/MSBuild.exe /p:IlcPath=${CoreRT_ToolchainDir} /p:Configuration=${CoreRT_BuildType} ${__extra_args} ${__dir_path}/${__filename}.csproj + ${__msbuild_dir}/corerun ${__msbuild_dir}/MSBuild.exe /p:IlcPath=${CoreRT_ToolchainDir} /p:Configuration=${CoreRT_BuildType} ${__extra_args} ${__dir_path}/${__filename}.csproj + runtest ${__dir_path} ${__filename} local __exitcode=$? if [ ${__exitcode} == 0 ]; then @@ -133,11 +123,6 @@ else __BuildRid=osx.10.10-${CoreRT_BuildArch} fi -if [ ! -d ${CoreRT_AppDepSdkDir} ]; then - echo "AppDep SDK not installed at ${CoreRT_AppDepSdkDir}" - exit -1 -fi - if [ ! -d ${CoreRT_ToolchainDir} ]; then echo "Toolchain not found in ${CoreRT_ToolchainDir}" exit -1 @@ -152,14 +137,12 @@ echo > ${__CoreRTTestBinDir}/testResults.tmp __BuildOsLowcase=$(echo "${CoreRT_BuildOS}" | tr '[:upper:]' '[:lower:]') -for json in $(find src -iname 'project.json') +for csproj in $(find src -name "*.csproj") do - if [ ! -e `dirname ${json}`/no_unix ]; then - __restore=1 - run_test_dir ${json} ${__restore} "Jit" - __restore=0 - if [ ! -e `dirname ${json}`/no_cpp ]; then - run_test_dir ${json} ${__restore} "Cpp" + if [ ! -e `dirname ${csproj}`/no_unix ]; then + run_test_dir ${csproj} "Jit" + if [ ! -e `dirname ${csproj}`/no_cpp ]; then + run_test_dir ${csproj} "Cpp" fi fi done |