Shorten path names of test binaries in the CI to avoid file names longer than 260...
authorWilliam Godbe <william.godbe@comcast.net>
Tue, 26 Jan 2016 23:05:07 +0000 (15:05 -0800)
committerWilliam Godbe <william.godbe@comcast.net>
Tue, 26 Jan 2016 23:39:36 +0000 (15:39 -0800)
netci.groovy
tests/buildtest.cmd

index c9dc5aa50fc9f5495697efcca649f89a359cca9e..7672bcabab0dcaf0f152a03d7f44effb5b982a46 100644 (file)
@@ -559,6 +559,14 @@ combinedScenarios.each { scenario ->
                             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}"
                                     }
index 96d13371f34188b5f44d915bec1375ad6340ffdd..8e62e530e45894d365eb567605bde3cbd0496228 100644 (file)
@@ -91,8 +91,12 @@ set "__TestBinDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildType%\"
 :: 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%"