OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [testsuite/] [gdb.gdbtk/] [srcwin.exp] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# Copyright 1999, 2001 Red Hat, Inc.
2
#
3
# This program is free software; you can redistribute it and/or modify it
4
# under the terms of the GNU General Public License (GPL) as published by
5
# the Free Software Foundation; either version 2 of the License, or (at
6
# your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
 
13
if {[gdbtk_initialize_display]} {
14
  if {$tracelevel} {
15
    strace $tracelevel
16
  }
17
 
18
  #
19
  # test source window
20
  #
21
  set prms_id 0
22
  set bug_id 0
23
 
24
  set testfile "list"
25
  set s1 "$srcdir/$subdir/list0.c"
26
  set sources "$s1 $srcdir/$subdir/list1.c"
27
  set binfile $objdir/$subdir/$testfile
28
  if {[file exists $s1.save]} {
29
    catch {file delete $s1}
30
    file rename $s1.save $s1
31
  }
32
  set r [gdb_compile $sources "$binfile" executable debug]
33
  if  { $r != "" } {
34
    gdb_suppress_entire_file \
35
      "Testcase compile failed, so some tests in this file will automatically fail."
36
  }
37
 
38
  # Start with a fresh gdbtk
39
  gdb_exit
40
  set results [gdbtk_start [file join $srcdir $subdir srcwin.test]]
41
  set results [split $results \n]
42
  set all_results $results
43
 
44
  # move file with "main" out of the way
45
  file rename $s1 $s1.save
46
 
47
  # run slightly different set of tests
48
  gdb_exit
49
  set results [gdbtk_start [file join $srcdir $subdir srcwin2.test]]
50
  set results [split $results \n]
51
  set all_results [concat $all_results $results]
52
 
53
  # restore file
54
  file rename $s1.save $s1
55
 
56
  set r [gdb_compile $sources "$binfile" executable ""]
57
  if  { $r != "" } {
58
    gdb_suppress_entire_file \
59
      "Testcase compile failed, so some tests in this file will automatically fail."
60
  }
61
  # run slightly different set of tests
62
  gdb_exit
63
  set results [gdbtk_start [file join $srcdir $subdir srcwin3.test]]
64
  set results [split $results \n]
65
  set all_results [concat $all_results $results]
66
 
67
  # Analyze results
68
  gdbtk_done $all_results
69
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.