]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Replace occurances of testprog with $test_prog. Initialise this variable to
authorNick Clifton <nickc@redhat.com>
Thu, 19 Jun 2003 07:45:50 +0000 (07:45 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 19 Jun 2003 07:45:50 +0000 (07:45 +0000)
testprog.exe on Cygwin targeted systems.

binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/objcopy.exp

index c1a23993fb1e28a86bf65e423b4a83ccade952fd..23eaaf7daff981375a3d44f5c0e351589fa81eb7 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-19  Nick Clifton  <nickc@redhat.com>
+
+       * binutils-all/objcopy.exp: Replace occurances of testprog with
+       $test_prog.  Initialise this variable to testprog.exe on Cygwin
+       targeted systems.
+
 2003-04-26  Nick Clifton  <nickc@redhat.com>
 
        * binutils-all/readelf.exp (prune_read_warnings): Rename to
index 5d4a1bbd18debd11fda2e70826d6db189edf70e9..795c1b72abfd6814fde81bccce8d2cfd63b7bc51 100644 (file)
@@ -425,10 +425,17 @@ strip_test_with_saving_a_symbol
 
 # Build a final executable.
 
+if { [istarget *-*-cygwin] } {
+    set test_prog "testprog.exe"
+} else {
+    set test_prog "testprog"
+}
+
 proc copy_setup { } {
     global srcdir
     global subdir
     global gcc_gas_flag
+    global test_prog
     
     set res [build_wrapper testglue.o];
     set flags { debug };
@@ -445,11 +452,11 @@ proc copy_setup { } {
            set flags "additional_flags=$i $flags"
        }
     }
-    if { [target_compile "$srcdir/$subdir/testprog.c $add_libs" tmpdir/testprog executable $flags]  != "" } {
+    if { [target_compile "$srcdir/$subdir/testprog.c $add_libs" tmpdir/$test_prog executable $flags]  != "" } {
        return 2
     }
 
-    set result [remote_load target tmpdir/testprog];
+    set result [remote_load target tmpdir/$test_prog];
     set status [lindex $result 0];
 
     if { $status != "pass"  } {
@@ -463,12 +470,13 @@ proc copy_setup { } {
 # Test copying an executable.
 
 proc copy_executable { prog flags test1 test2 } {
+    global test_prog
 
     if [is_remote host] {
-       set testfile [remote_download host tmpdir/testprog];
+       set testfile [remote_download host tmpdir/$test_prog];
        set testcopy copyprog
     } else {
-       set testfile tmpdir/testprog
+       set testfile tmpdir/$test_prog
        set testcopy tmpdir/copyprog
     }
     remote_file host delete $testcopy;
@@ -485,7 +493,7 @@ proc copy_executable { prog flags test1 test2 } {
        remote_upload host $testcopy tmpdir/copyprog
     }
 
-    set status [remote_exec build "cmp" "tmpdir/testprog tmpdir/copyprog"]
+    set status [remote_exec build "cmp" "tmpdir/$test_prog tmpdir/copyprog"]
     set exec_output [lindex $status 1];
 
     if [string match "" $exec_output] then {