From 285360d3a869f4b2492c3d36b3d373f2cf6be08f Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 22 Dec 2009 17:29:28 +0000 Subject: [PATCH] Various cleanups in the scripts. Should be good for now git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6929 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- buildtools/README | 19 ++++++++++++++++ ...totools.sh => test_dist_with_autotools.sh} | 6 +++-- buildtools/scripts/test_dist_with_cmake.sh | 22 +++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 buildtools/README rename buildtools/scripts/{build_with_autotools.sh => test_dist_with_autotools.sh} (79%) create mode 100755 buildtools/scripts/test_dist_with_cmake.sh diff --git a/buildtools/README b/buildtools/README new file mode 100644 index 0000000000..9bfdc8af91 --- /dev/null +++ b/buildtools/README @@ -0,0 +1,19 @@ +The CMake configuration in this directory cannot be used to build SimGrid +Instead, it can be used to auto-test it. + +To use it, you need a svn checkout under ~/simgrid-svn. Command to create it: + cd + svn checkout svn://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk simgrid-svn + +Then, you need to create a distribution archive, with this command: + ~/simgrid-svn/buildtools/scripts/make_dist.sh +The archive will be copied into the ~/simgrid directory. + + +Then, you can test the archive with autotools only using that command: + ~/simgrid-svn/buildtools/scripts/test_dist_with_autotools.sh +Alternatively, you can test the archive with cmake using that command: + ~/simgrid-svn/buildtools/scripts/test_dist_with_cmake.sh + +Please note that autotools are needed in any cases. Only the test +mechanism changes between the two pathes so far. \ No newline at end of file diff --git a/buildtools/scripts/build_with_autotools.sh b/buildtools/scripts/test_dist_with_autotools.sh similarity index 79% rename from buildtools/scripts/build_with_autotools.sh rename to buildtools/scripts/test_dist_with_autotools.sh index cb0b4623ea..c773f45b5c 100755 --- a/buildtools/scripts/build_with_autotools.sh +++ b/buildtools/scripts/test_dist_with_autotools.sh @@ -6,5 +6,7 @@ source ~/simgrid-svn/buildtools/scripts/simgrid_build.conf open_archive -./configure $@ -make +if [ ! -e Makefile ] ; then + ./configure $@ +fi +./checkall diff --git a/buildtools/scripts/test_dist_with_cmake.sh b/buildtools/scripts/test_dist_with_cmake.sh new file mode 100755 index 0000000000..034be4526f --- /dev/null +++ b/buildtools/scripts/test_dist_with_cmake.sh @@ -0,0 +1,22 @@ +#! /bin/bash +# This script waits that the make_dist script finishes building the right archive in ~/simgrid +# and then builds it using cmake. Warning, cmake is only a wrapper for now, you still need the autotools + + +source ~/simgrid-svn/buildtools/scripts/simgrid_build.conf + +open_archive + +# Make sure we have cmake installed +which_cmake=`which cmake` +if [ x$which_cmake = x ] ; then + echo "Try to install cmake" + sudo apt-get install cmake +fi + +# Launch CMake +cd buildtools/Cmake +cmake ./ + +# Run CTest, and push the results +ctest -D Experimental CTEST_FULL_OUTPUT -- 2.20.1