$(TestWorkingDir) $(CORE_ROOT) Core_Root_$(RuntimeID) $(TestWorkingDir)\archive\dummy $(TestWorkingDir)\archive\packages set RunCrossGen=true #!/bin/sh%0a $(WrapperShContents)%0a $(WrapperShContents)export CORE_ROOT="%24HELIX_CORRELATION_PAYLOAD"%0a $(WrapperShContents)%0a $(WrapperShContents)for scriptFilePath in %24(find . -type f -iname '%2A.sh' ! -iname "runtests.sh" | sort)%0a $(WrapperShContents)do%0a $(WrapperShContents) perl -pi -e 's/\r\n|\n|\r/\n/g' "%24scriptFilePath"%0a $(WrapperShContents) chmod +x "%24scriptFilePath"%0a $(WrapperShContents)done%0a $(WrapperShContents)%0a $(WrapperShContents)export RunCrossGen=true%0a $(WrapperShContents)overlayDir=%24CORE_ROOT%0a $(WrapperShContents)if [ ! -f %24overlayDir/crossgenCompleted.mrk ]%3B then%0a $(WrapperShContents) filesToPrecompile=%24(find -L %24overlayDir -iname \%2A.dll -not -iname \%2A.ni.dll -not -iname \%2A-ms-win-\%2A -type f )%0a $(WrapperShContents) for fileToPrecompile in %24{filesToPrecompile}%0a $(WrapperShContents) do%0a $(WrapperShContents) filename=%24{fileToPrecompile}%0a $(WrapperShContents) echo Precompiling %24filename%0a $(WrapperShContents) %24overlayDir/crossgen /Platform_Assemblies_Paths %24overlayDir /in %24filename /out %24overlayDir/temp.ni.dll 1> %24filename.stdout 2>%24filename.stderr%0a $(WrapperShContents) exitCode=%24%3F%0a $(WrapperShContents) if [ %24exitCode != 0 ]%3B then%0a $(WrapperShContents) if grep -q -e '(COR_E_ASSEMBLYEXPECTED)' %24filename.stderr%3B then%0a $(WrapperShContents) printf "\n\t%24filename is not a managed assembly.\n\n"%0a $(WrapperShContents) else%0a $(WrapperShContents) echo Unable to precompile %24filename.%0a $(WrapperShContents) fi%0a $(WrapperShContents) else%0a $(WrapperShContents) rm %24filename%0a $(WrapperShContents) mv %24overlayDir/temp.ni.dll %24filename%0a $(WrapperShContents) fi%0a $(WrapperShContents) rm %24filename.stdout%0a $(WrapperShContents) rm %24filename.stderr%0a $(WrapperShContents) done%0a $(WrapperShContents) touch %24overlayDir/crossgenCompleted.mrk%0a $(WrapperShContents)fi%0a $(WrapperShContents)%0a $(WrapperShContents)echo BEGIN EXECUTION%0a $(WrapperShContents)echo "%24{HELIX_CORRELATION_PAYLOAD}/corerun" %24HELIX_WORKITEM_PAYLOAD/xunit.console.netcore.exe %24HELIX_WORKITEM_PAYLOAD/$(ProjectName) -noshadow -xml testResults.xml -notrait category=outerloop -notrait category=failing%0a $(WrapperShContents)"%24{HELIX_CORRELATION_PAYLOAD}/corerun" %24HELIX_WORKITEM_PAYLOAD/xunit.console.netcore.exe %24HELIX_WORKITEM_PAYLOAD/$(ProjectName) -noshadow -xml testResults.xml -notrait category=outerloop -notrait category=failing%0a $(WrapperShContents)ErrorLevel=%24%3F%0a $(WrapperShContents)%0a $(WrapperShContents)echo Finished running tests. Exit code = %24ErrorLevel%0a $(WrapperShContents)exit %24ErrorLevel%0a $(MSBuildProjectName)