Author: tucu Date: Thu Oct 18 22:49:07 2012 New Revision: 1399904 URL: http://svn.apache.org/viewvc?rev=1399904&view=rev Log: HADOOP-8887. Use a Maven plugin to build the native code using CMake. (cmccabe via tucu)
Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/pom.xml hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/test/test-container-executor.c Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/pom.xml URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/pom.xml?rev=1399904&r1=1399903&r2=1399904&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/pom.xml (original) +++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/pom.xml Thu Oct 18 22:49:07 2012 @@ -47,40 +47,31 @@ <build> <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <configuration> - <skipTests>false</skipTests> - </configuration> + <groupId>org.apache.hadoop.cmake.maven.ng</groupId> + <artifactId>cmake-ng</artifactId> <executions> <execution> - <id>make</id> - <phase>compile</phase> - <goals><goal>run</goal></goals> + <id>cmake-compile</id> + <goals><goal>compile</goal></goals> <configuration> - <target> - <mkdir dir="${project.build.directory}/native/target"/> - <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true"> - <arg line="${basedir}/src/ -DHADOOP_CONF_DIR=${container-executor.conf.dir} -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model}"/> - <env key="CFLAGS" value="${container-executor.additional_cflags}"/> - </exec> - <exec executable="make" dir="${project.build.directory}/native" failonerror="true"> - <arg line="VERBOSE=1"/> - </exec> - </target> + <target>all</target> + <source>${basedir}/src</source> + <vars> + <HADOOP_CONF_DIR>${container-executor.conf.dir}</HADOOP_CONF_DIR> + <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL> + </vars> + <env> + <CFLAGS>${container-executor.additional_cflags}</CFLAGS> + </env> </configuration> </execution> <execution> - <id>native_tests</id> - <phase>test</phase> + <id>test-container-executor</id> + <goals><goal>test</goal></goals> <configuration> - <target> - <exec executable="sh" failonerror="true" dir="${project.build.directory}/native"> - <arg value="-c"/> - <arg value="[ x$SKIPTESTS = xtrue ] || test-container-executor"/> - <env key="SKIPTESTS" value="${skipTests}"/> - </exec> - </target> + <binary>${project.build.directory}/native/target/usr/local/bin/test-container-executor</binary> + <timeout>300</timeout> + <results>${project.build.directory}/results</results> </configuration> </execution> </executions> Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/test/test-container-executor.c URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/test/test-container-executor.c?rev=1399904&r1=1399903&r2=1399904&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/test/test-container-executor.c (original) +++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/test/test-container-executor.c Thu Oct 18 22:49:07 2012 @@ -400,6 +400,13 @@ void run_test_in_child(const char* test_ } void test_signal_container() { + sigset_t set; + + // unblock SIGQUIT + sigemptyset(&set); + sigaddset(&set, SIGQUIT); + sigprocmask(SIG_UNBLOCK, &set, NULL); + printf("\nTesting signal_container\n"); fflush(stdout); fflush(stderr);