switch (architecture) {
case 'x64':
case 'x86':
+
+ // This will shorten the output file path lengths
+ // if __TestIntermediateDir is already set, buildtest.cmd will
+ // output test binaries to that directory. If it is not set, the
+ // binaries are sent to a default directory whose name is about
+ // 35 characters long.
+ buildCommands += "set __TestIntermediateDir=int"
+
if (scenario == 'default' || Constants.jitStressModeScenarios.containsKey(scenario)) {
buildCommands += "build.cmd ${lowerConfiguration} ${architecture}"
}
:: We have different managed and native intermediate dirs because the managed bits will include
:: the configuration information deeper in the intermediates path.
:: These variables are used by the msbuild project files.
-set "__NativeTestIntermediatesDir=%__RootBinDir%\tests\obj\%__BuildOS%.%__BuildArch%.%__BuildType%\Native"
-set "__ManagedTestIntermediatesDir=%__RootBinDir%\tests\obj\%__BuildOS%.%__BuildArch%.%__BuildType%\Managed"
+
+if not defined __TestIntermediateDir (
+ set "__TestIntermediateDir=tests\obj\%__BuildOS%.%__BuildArch%.%__BuildType%"
+)
+set "__NativeTestIntermediatesDir=%__RootBinDir%\%__TestIntermediateDirDir%\Native"
+set "__ManagedTestIntermediatesDir=%__RootBinDir%\%__TestIntermediateDir%\Managed"
:: Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash
set "__CMakeBinDir=%__TestBinDir%"