瀏覽代碼

MAPREDUCE-6743. nativetask unit tests need to provide usable output; fix link errors during mvn test

Allen Wittenauer 8 年之前
父節點
當前提交
be88d574a9

+ 7 - 3
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/pom.xml

@@ -207,12 +207,16 @@
                 <phase>test</phase>
                 <goals><goal>cmake-test</goal></goals>
                 <configuration>
-                  <testName>test-native-task</testName>
+                  <!-- this should match the xml name without the TEST-part down below -->
+                  <testName>nativetask-nttest</testName>
                   <workingDirectory>${project.build.directory}/native/test</workingDirectory>
                   <source>${basedir}/src</source>
                   <binary>${project.build.directory}/native/test/nttest</binary>
-                  <args><arg>--gtest_filter=-Perf.</arg></args>
-                  <results>${project.build.directory}/native/test/native-results</results>
+                  <args>
+                    <arg>--gtest_filter=-Perf.</arg>
+                    <arg>--gtest_output=xml:${project.build.directory}/surefire-reports/TEST-nativetask-nttest.xml</arg>
+                  </args>
+                  <results>${project.build.directory}/surefire-reports</results>
                 </configuration>
               </execution>
             </executions>

+ 2 - 0
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/CMakeLists.txt

@@ -98,7 +98,9 @@ include_directories(
 # add gtest as system library to suppress gcc warnings
 include_directories(SYSTEM ${SRC}/gtest/include)
 
+set(CMAKE_MACOSX_RPATH TRUE)
 set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
     # macosx does not have -lrt

File diff suppressed because it is too large
+ 472 - 184
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/gtest/gtest-all.cc


File diff suppressed because it is too large
+ 875 - 119
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/gtest/include/gtest/gtest.h


Some files were not shown because too many files changed in this diff