Author: jlebar Date: Tue Apr 19 13:52:28 2016 New Revision: 266796 URL: http://llvm.org/viewvc/llvm-project?rev=266796&view=rev Log: [CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't found)
Added: cfe/trunk/test/Driver/cuda-not-found.cu Added: cfe/trunk/test/Driver/cuda-not-found.cu URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cuda-not-found.cu?rev=266796&view=auto ============================================================================== --- cfe/trunk/test/Driver/cuda-not-found.cu (added) +++ cfe/trunk/test/Driver/cuda-not-found.cu Tue Apr 19 13:52:28 2016 @@ -0,0 +1,12 @@ +// REQUIRES: clang-driver + +// Check that we raise an error if we're trying to compile CUDA code but can't +// find a CUDA install, unless -nocudainc was passed. + +// RUN: %clang -### --sysroot=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix ERR +// RUN: %clang -### --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix ERR +// ERR: cannot find CUDA installation + +// RUN: %clang -### -nocudainc --sysroot=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix OK +// RUN: %clang -### -nocudainc --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix OK +// OK-NOT: cannot find CUDA installation _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits