]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Only test indentation on pull requests. 117/head
authorLuca Heltai <luca.heltai@sissa.it>
Mon, 25 Aug 2014 14:06:01 +0000 (16:06 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Mon, 25 Aug 2014 14:06:01 +0000 (16:06 +0200)
.travis.yml
contrib/utilities/run_travis.sh

index 8e6ed60f5900013833de2edd6c51194f15919301..f8ba47b8eaea1ba6fa1aa19f80cc1656173d49cd 100644 (file)
@@ -22,6 +22,7 @@ env:
 
 #  These tests run ok, but they might be out of policy...
   - CI_TEST_SUITE=build CI_BUILD_TYPE=Debug
+  - CI_TEST_SUITE=indent
 #  - CI_TEST_SUITE=build CI_BUILD_TYPE=Release
 
 # These tests only compile and run "make tests"
index 651dc1b1d7936c9e3079bf159eddfe83c360872c..5d9ac762154c1e8fc37170827fd3cb9717947923 100755 (executable)
@@ -1,21 +1,30 @@
 #!/bin/sh
 case $1 in
-#mini)
-#    echo "Building and running mini tests in $2 mode."
-#    mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=$2 ../ && make -j4 && make tests
-#    ;;
 build)
-    echo "Running build tests."
-    mkdir build_test 
-    cd build_test
-    ctest -DCMAKE_BUILD_TYPE=$2 -V -j4 -S ../tests/run_buildtest.cmake
+    if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then 
+       echo "Running build tests."
+       mkdir build_test 
+       cd build_test
+       ctest -DCMAKE_BUILD_TYPE=$2 -V -j4 -S ../tests/run_buildtest.cmake
+    else 
+       echo "Build test is only run when merging to master branch. Exiting."
+    fi
     ;;
-#tests)
-#    echo "Running full testsuite."
-#    mkdir full_tests
-#    cd full_tests
-#    ctest -DCMAKE_BUILD_TYPE=$2 -V -j4 -S ../tests/run_testsuite.cmake
-#    ;;
+indent)
+     if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then 
+       echo "Running indentation test on master merge."
+     else 
+        echo "Running indentation test on Pull Request #${TRAVIS_PULL_REQUEST}"
+     fi
+     wget http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz > /dev/null
+     tar xvfz astyle_2.04_linux.tar.gz > /dev/null
+     pushd astyle/build/gcc
+     make -j4 > /dev/null
+     popd
+     export PATH=`pwd`/astyle/build/gcc/bin:$PATH
+     ./contrib/utilities/indent
+     git diff-files --quiet || (git diff && failing_missing_command)   
+     ;;
 *)
     echo "Unrecognized test type! [$1]"
     exit 1

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.