aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib/perftest.exp
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2015-07-24 15:43:15 -0700
committerDoug Evans <dje@google.com>2015-07-24 15:43:15 -0700
commit6eab34f3dc27a571071d8c56146c2ffda133f454 (patch)
tree2eeb527f3dbaf376cdcc7bd3158fb11f71ef4aca /gdb/testsuite/lib/perftest.exp
parent63738bfdb96f654322794384993a6f5d8608aab9 (diff)
downloadgdb-6eab34f3dc27a571071d8c56146c2ffda133f454.zip
gdb-6eab34f3dc27a571071d8c56146c2ffda133f454.tar.gz
gdb-6eab34f3dc27a571071d8c56146c2ffda133f454.tar.bz2
Add perf testcase generator.
gdb/testsuite/ChangeLog: * gdb.perf/README: New file. * lib/perftest.exp (tcl_string_list_to_python_list): New function. * lib/gen-perf-test.exp: New file.
Diffstat (limited to 'gdb/testsuite/lib/perftest.exp')
-rw-r--r--gdb/testsuite/lib/perftest.exp14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/perftest.exp b/gdb/testsuite/lib/perftest.exp
index e5398e3..42cdbcf 100644
--- a/gdb/testsuite/lib/perftest.exp
+++ b/gdb/testsuite/lib/perftest.exp
@@ -141,3 +141,17 @@ proc skip_perf_tests { } {
return 1
}
+
+# Given a list of tcl strings, return the same list as the text form of a
+# python list.
+
+proc tcl_string_list_to_python_list { l } {
+ proc quote { text } {
+ return "\"$text\""
+ }
+ set quoted_list ""
+ foreach elm $l {
+ lappend quoted_list [quote $elm]
+ }
+ return "([join $quoted_list {, }])"
+}