Skip to content
Snippets Groups Projects
Forked from Utils / KWSys
558 commits behind the upstream repository.
  • Kitware Robot's avatar
    6c973b46
    Revise C++ coding style using clang-format · 6c973b46
    Kitware Robot authored and Brad King's avatar Brad King committed
    Run the `clang-format.bash` script to update all our C and C++ code to a new
    style defined by `.clang-format`.  Use `clang-format` version 3.8.
    
    * If you reached this commit for a line in `git blame`, re-run the blame
      operation starting at the parent of this commit to see older history
      for the content.
    
    * See the parent commit for instructions to rebase a change across this
      style transition commit.
    
    Change-Id: Ie3aedc03bfe5c3999d4a077fafb8c6f3bbffc5c5
    6c973b46
    History
    Revise C++ coding style using clang-format
    Kitware Robot authored and Brad King's avatar Brad King committed
    Run the `clang-format.bash` script to update all our C and C++ code to a new
    style defined by `.clang-format`.  Use `clang-format` version 3.8.
    
    * If you reached this commit for a line in `git blame`, re-run the blame
      operation starting at the parent of this commit to see older history
      for the content.
    
    * See the parent commit for instructions to rebase a change across this
      style transition commit.
    
    Change-Id: Ie3aedc03bfe5c3999d4a077fafb8c6f3bbffc5c5
testFail.c 676 B
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing#kwsys for details.  */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int testFail(int argc, char* argv[])
{
  char* env = getenv("DASHBOARD_TEST_FROM_CTEST");
  int oldCtest = 0;
  if (env) {
    if (strcmp(env, "1") == 0) {
      oldCtest = 1;
    }
    printf("DASHBOARD_TEST_FROM_CTEST = %s\n", env);
  }
  printf("%s: This test intentionally fails\n", argv[0]);
  if (oldCtest) {
    printf("The version of ctest is not able to handle intentionally failing "
           "tests, so pass.\n");
    return 0;
  }
  return argc;
}