OSDN Git Service

2010-03-24 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Mar 2010 22:52:47 +0000 (22:52 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 00:35:12 +0000 (09:35 +0900)
PR testsuite/41609
* lib/objc-torture.exp (objc-set-runtime-options): New.
* objc/execute/execute.exp: Check runtime options on each pass.
* objc/execute/exceptions/exceptions.exp: Ditto.
* objc/compile/compile.exp: Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157716 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/lib/objc-torture.exp

index 12021bc..367625a 100644 (file)
@@ -1,5 +1,11 @@
 2010-03-24  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
 
+       PR testsuite/41609
+       * lib/objc-torture.exp (objc-set-runtime-options): New.
+       * objc/execute/execute.exp: Check runtime options on each pass.
+       * objc/execute/exceptions/exceptions.exp: Ditto.
+       * objc/compile/compile.exp: Ditto.
+
        PR testsuite/42348
        * lib/target-supports.exp: Add support for ObjC/ObjC++ tools in
        standard tests.
index a3d1ef2..0b6362b 100644 (file)
@@ -46,55 +46,28 @@ proc objc-set-runtime-options { dowhat args } {
            lappend options $args
        }
        verbose "options $options"
+       set test_obj "trivial.exe"
+       set comp_output [objc_target_compile \
+       "$srcdir/$subdir/trivial.m" $test_obj executable $options]
+
+       # If we get any error, then we failed.
+       if ![string match "" $comp_output] then {
+           remote_file build delete $test_obj
+           continue;
+       }
        if [info exists dowhat] {
-          switch $dowhat {
-           "compile" {
-             set compile_type "assembly"
-             set output_file "trivial.s"
-             set comp_output [objc_target_compile \
-               "$srcdir/$subdir/trivial.m" "$output_file" "$compile_type" $options]
-
-             remote_file build delete $output_file
-             # If we get any error, then we failed.
-             if ![string match "" $comp_output] then {
-               continue;
-             }
-           }
-           "execute" {
-             set test_obj "trivial.exe"
-             set comp_output [objc_target_compile \
-               "$srcdir/$subdir/trivial.m" $test_obj "executable" $options]
-
-             # If we get any error, then we failed.
-             if ![string match "" $comp_output] then {
-               remote_file build delete $test_obj
-               continue;
-             }
-             set result [objc_load "$tmpdir/$test_obj" "" ""]
-             set status [lindex $result 0]
-             set output [lindex $result 1]
-             remote_file build delete $test_obj
-             if { $status != "pass" } {
-               verbose -log "trivial execute failed with $status $output"
-               continue;
-             }
-           }
-           default {
-             perror "$dowhat: not a valid objc-torture action"
-             return ""
+           if { $dowhat == "execute" } {
+               set result [objc_load "$tmpdir/$test_obj" "" ""]
+               set status [lindex $result 0]
+               set output [lindex $result 1]
+               if { $status != "pass" } {
+                   remote_file build delete $test_obj
+                   verbose -log "trivial execute failed with $status $output"
+                   continue;
+               }
            }
-         }
-       } else {
-         set test_obj "trivial.exe"
-         set comp_output [objc_target_compile \
-         "$srcdir/$subdir/trivial.m" $test_obj executable $options]
-
-         # If we get any error, then we failed.
-         remote_file build delete $test_obj
-         if ![string match "" $comp_output] then {
-             continue;
-         }
        }
+       remote_file build delete $test_obj
        lappend OBJC_RUNTIME_OPTIONS $type
     }