]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Require codecov-bash to be downloaded manually
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 25 Apr 2018 09:23:07 +0000 (11:23 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 25 Apr 2018 09:23:07 +0000 (11:23 +0200)
contrib/utilities/download_codecov_bash.sh [new file with mode: 0755]
tests/run_testsuite.cmake

diff --git a/contrib/utilities/download_codecov_bash.sh b/contrib/utilities/download_codecov_bash.sh
new file mode 100755 (executable)
index 0000000..8999cd3
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2018 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+#
+# This script downloads the global coverage report uploader for Codecov.
+# If you are running the testsuite to create coverage information and
+# the codecov uploader is present, there is also a report uploaded to
+# https://codecov.io/gh/dealii/dealii.
+#
+
+PRG="$(cd "$(dirname "$0")" && pwd)/programs"
+CODECOV_PATH="${PRG}/codecov"
+
+if [ ! -d "$PRG" ]
+then
+    echo "create folder $PRG"
+    mkdir "$PRG"
+fi
+
+# codecov
+if [ ! -d "$CODECOV_PATH" ]
+then
+    echo "Downloading codecov-bash."
+    mkdir "$CODECOV_PATH"
+    curl -s "https://codecov.io/bash" > $CODECOV_PATH/codecov-bash.sh
+fi
index 51deed64e8343358ae835c980735b7c46ace9fb9..a7a7e6c5c09a0be0ded4a87084769882de9c4184 100644 (file)
@@ -547,10 +547,14 @@ IF("${_res}" STREQUAL "0")
     IF(COVERAGE)
       CREATE_TARGETDIRECTORIES_TXT()
       MESSAGE("-- Running CTEST_COVERAGE()")
-      #CTEST_COVERAGE()
-      FILE(DOWNLOAD "https://codecov.io/bash" "${CMAKE_CURRENT_BINARY_DIR}/tests/codecov-bash")
-      EXECUTE_PROCESS(COMMAND bash "${CMAKE_CURRENT_BINARY_DIR}/tests/codecov-bash"
-                              "-t ac85e7ce-5316-4bc1-a237-2fe724028c7b" "-x '${GCOV_COMMAND}'")
+      CTEST_COVERAGE()
+      SET (CODE_COV_BASH "${CMAKE_CURRENT_LIST_DIR}/../contrib/utilities/programs/codecov/codecov-bash.sh")
+      IF (EXISTS ${CODE_COV_BASH})
+        MESSAGE("-- Running codecov-bash")
+        EXECUTE_PROCESS(COMMAND bash "${CODE_COV_BASH}"
+                                     "-t ac85e7ce-5316-4bc1-a237-2fe724028c7b" "-x '${GCOV_COMMAND}'"
+                        OUTPUT_QUIET)
+      ENDIF()
       CLEAR_TARGETDIRECTORIES_TXT()
     ENDIF(COVERAGE)
 
@@ -593,4 +597,4 @@ IF("${_res}" STREQUAL "0")
   MESSAGE("-- Submission successful. Goodbye!")
 ENDIF()
 
-# .oO( This script is freaky 596 lines long... )
+# .oO( This script is freaky 600 lines long... )

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.