This is the mail archive of the frysk-cvs@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SCM] master: Emit one test per variable.


The branch, master has been updated
       via  95a13e25dd80d0d529c9ecaedd1c51e506402fb7 (commit)
      from  78344c59350f0a1b825086acdd677ca6eee6c9bd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 95a13e25dd80d0d529c9ecaedd1c51e506402fb7
Author: Stan Cox <scox@redhat.com>
Date:   Mon Dec 3 19:33:19 2007 -0500

    Emit one test per variable.
    
    * gen-type-expect-tests.py (main): Emit one test per variable.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/debuginfo/ChangeLog               |    4 +++
 .../frysk/debuginfo/gen-type-expect-tests.py       |   23 ++++++-------------
 frysk-core/frysk/pkglibdir/ChangeLog               |    4 +++
 frysk-core/frysk/pkglibdir/gen-type-funit-tests.py |   10 --------
 4 files changed, 15 insertions(+), 26 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/debuginfo/ChangeLog b/frysk-core/frysk/debuginfo/ChangeLog
index 1a6cbe0..ad2fdc3 100644
--- a/frysk-core/frysk/debuginfo/ChangeLog
+++ b/frysk-core/frysk/debuginfo/ChangeLog
@@ -1,3 +1,7 @@
+2007-12-03  Stan Cox  <scox@redhat.com>
+
+	* gen-type-expect-tests.py (main): Emit one test per variable.
+
 2007-12-02  Stan Cox  <scox@redhat.com>
 
 	* TestTypeEntryType.java-sh: Delete.
diff --git a/frysk-core/frysk/debuginfo/gen-type-expect-tests.py b/frysk-core/frysk/debuginfo/gen-type-expect-tests.py
index 3bfa97d..73aaa1f 100644
--- a/frysk-core/frysk/debuginfo/gen-type-expect-tests.py
+++ b/frysk-core/frysk/debuginfo/gen-type-expect-tests.py
@@ -141,11 +141,9 @@ public class %s extends TestLib {
 ''')
 
     def start_test(self, executable, name):
-        print("    public void test%s () {" % (name))
+        print("    public void test_%s () {" % (name))
         tokens = os.path.abspath(executable).split(".")
-        print('''
-	TypeTestbed typeTestbed = new TypeTestbed("%s", "test%s");
-''' % (os.path.basename(tokens[0]), name))
+        print('	TypeTestbed typeTestbed = new TypeTestbed("%s", "test%s");' % (os.path.basename(tokens[0]), name))
 
     def add_test(self, name, type, etype, decl, value):
         name = name.rstrip()
@@ -208,7 +206,6 @@ j_file.open()
 j_file.prologue()
 
 
-test = "Types"
 name = type = etype = value = ""
 while (True):
     line = d_file.readline()
@@ -220,22 +217,17 @@ while (True):
     # Output collected test info
     if (line[0:2] != "//"):
         if (name != ""):
-            if (test == "Types"):
-                j_file.start_test(filename, test)
+            filename = sys.argv[current_file]
+            j_file.start_test(filename, name)
             j_file.add_test(name, type, type, type, value)
+            j_file.end_test()
             name = type = etype = value = ""
         continue
     tokens = line.split()
     try:
         # Collect test info
-        if (tokens[1] == "Test:"):
-            if (test != "Types"):
-                j_file.end_test()
-                filename = sys.argv[current_file]
-            test = line[line.find(tokens[1]) + len(tokens[1]) + 1:].rstrip()
-            j_file.start_test(filename, test)
-        elif (tokens[1] == "Name:"):
-            name = name + line[line.find(tokens[1]) + len(tokens[1]) + 1:]
+        if (tokens[1] == "Name:"):
+            name = line[line.find(tokens[1]) + len(tokens[1]) + 1:].rstrip()
         elif (tokens[1] == "Type:"):
             type = type + line[line.find(tokens[1]) + len(tokens[1]) + 1:]
         elif (tokens[1] == "EType:"):
@@ -245,5 +237,4 @@ while (True):
     except IndexError:
         True
 
-j_file.end_test()
 j_file.epilogue()
diff --git a/frysk-core/frysk/pkglibdir/ChangeLog b/frysk-core/frysk/pkglibdir/ChangeLog
index e8b9b2d..856de0f 100644
--- a/frysk-core/frysk/pkglibdir/ChangeLog
+++ b/frysk-core/frysk/pkglibdir/ChangeLog
@@ -1,3 +1,7 @@
+2007-12-03  Stan Cox  <scox@redhat.com>
+
+	* gen-type-expect-tests.py (main): Emit one test per variable.
+
 2007-12-03  Andrew Cagney  <cagney@redhat.com>
 
 	* funit-regs.S (fxregs) [__i386__ || __x86_64__]: Provide initial
diff --git a/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py b/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py
index 4145923..1597c5e 100644
--- a/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py
+++ b/frysk-core/frysk/pkglibdir/gen-type-funit-tests.py
@@ -86,11 +86,8 @@ for m in type_modifiers:
 tm = tm.rstrip()
 te = te.lstrip()
 tms = tm.rstrip().replace(" ","_")
-c_file.write("// Scalar ########################################\n")
-c_file.write("// Test: Scalar\n")
 for t in base_types:
     try:
-        c_file.write("// %s\n" % t);
         ts = t.replace(" ","_")
         min = limits[t]['min']
         max = limits[t]['max']
@@ -113,10 +110,7 @@ for t in base_types:
     except KeyError:
         continue
 
-c_file.write("// Array ########################################\n")
-c_file.write("// Test: Array\n")
 for t in base_types:
-    c_file.write("// array of %s\n" % (t))
     ts = t.replace(" ","_")
     min = limits[t]['min']
     max = limits[t]['max']
@@ -270,8 +264,6 @@ c_file.add("struct {\n  int int_var;\n} (*", "ptr_arr_struct", "", ")[2]")
 c_file.add("union {\n  int int_var;\n} (*", "ptr_arr_union", "", ")[2]")
 c_file.add("int * (*", "ptr_arr_ptr", "", ")[2]")
 
-c_file.write("// Struct ########################################\n")
-c_file.write("// Test: Struct\n")
 c_file.write('''typedef struct {
     char char_var;
     short short_var;
@@ -702,8 +694,6 @@ c_file.add('''union {
   int int_var;
 } * *''', "ptr_ptr_union", "")
 
-c_file.write("// Enum ########################################\n")
-c_file.write("// Test: Enum\n")
 c_file.add('''enum  {\n  red = 0,\n  green = 1,\n  blue = 2\n}''', "primary_colors", "red")
 c_file.add('''enum colors {\n  orange = 0,\n  yellow = 1,\n  violet = 2,\n  indigo = 3\n}''', "rainbow_colors", "orange")
 c_file.add('''enum  {\n  chevy = 0,\n  dodge = 44,\n  ford = 55\n}''', "usa_cars", "chevy")


hooks/post-receive
--
frysk system monitor/debugger


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]