aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/FrontendAda/dg.exp6
-rw-r--r--test/lib/llvm.exp17
2 files changed, 23 insertions, 0 deletions
diff --git a/test/FrontendAda/dg.exp b/test/FrontendAda/dg.exp
new file mode 100644
index 0000000000..8d2f1b0c40
--- /dev/null
+++ b/test/FrontendAda/dg.exp
@@ -0,0 +1,6 @@
+load_lib llvm.exp
+
+if [ llvm_gcc_supports_ada ] then {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{adb,ads}]]
+}
+
diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp
index 97eb05822e..e4a52a0c1c 100644
--- a/test/lib/llvm.exp
+++ b/test/lib/llvm.exp
@@ -194,6 +194,23 @@ proc llvm_gcc_supports_objc { } {
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" }
+ catch { file delete "/tmp/llvm_obj_check.out" }
+ if { $RESULT == 0 } {
+ return 1
+ } else {
+ return 0
+ }
+}
+
+proc llvm_gcc_supports_ada { } {
+ global llvmgcc
+ catch { set file_h [ open "/tmp/llvm_ada_check.adb" w] }
+ catch { puts $file_h "procedure llvm_ada_check is begin null; end;" }
+ catch { close $file_h }
+ set R [ catch { exec $llvmgcc -c -gnats "/tmp/llvm_ada_check.adb" >& /tmp/llvm_ada_check.out } ]
+ set RESULT [ file size "/tmp/llvm_ada_check.out" ]
+ catch { file delete "/tmp/llvm_ada_check.adb" }
+ catch { file delete "/tmp/llvm_ada_check.out" }
if { $RESULT == 0 } {
return 1
} else {