diff options
author | Devang Patel <dpatel@apple.com> | 2007-04-20 21:24:01 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-04-20 21:24:01 +0000 |
commit | 9fe9907ff9ee265cb0e741c6cf1074daf3eee6c4 (patch) | |
tree | 395cef429d06a8945f55299ab5f02a8a4c6839a2 | |
parent | ba647becb98fbb01cc02aa6a522971a639ea2534 (diff) | |
download | external_llvm-9fe9907ff9ee265cb0e741c6cf1074daf3eee6c4.zip external_llvm-9fe9907ff9ee265cb0e741c6cf1074daf3eee6c4.tar.gz external_llvm-9fe9907ff9ee265cb0e741c6cf1074daf3eee6c4.tar.bz2 |
Enable Objective-C tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36281 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/FrontendObjC/dg.exp | 6 | ||||
-rw-r--r-- | test/lib/llvm.exp | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/FrontendObjC/dg.exp b/test/FrontendObjC/dg.exp new file mode 100644 index 0000000..fddbf7f --- /dev/null +++ b/test/FrontendObjC/dg.exp @@ -0,0 +1,6 @@ +load_lib llvm.exp + +if [ llvm_gcc_supports_objc ] then { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{m}]] +} + diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp index 57e26e7..d54f488 100644 --- a/test/lib/llvm.exp +++ b/test/lib/llvm.exp @@ -187,3 +187,17 @@ proc RunLLVMTests { test_source_files } { } } } + +proc llvm_gcc_supports_objc { } { + global llvmgcc + catch { set file_h [ open "/tmp/llvm_obj_check.m" w] } + set R [ catch { exec $llvmgcc -c "/tmp/llvm_obj_check.m" -o /dev/null >& /tmp/llvm_obj_check.out } ] + set RESULT [ file size "/tmp/llvm_obj_check.out" ] + catch { file delete "/tmp/llvm_obj_check.m" } + if { $RESULT == 0 } { + return 1 + } else { + return 0 + } +} + |