New XML output format

Jacob Bachmeyer <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
There is currently an experimental (and broken as of this writing; the 
DB schema has been changed but work on the new import tool is stalled) 
branch "psql" in the repository, where an improved database storage 
model is being developed.  In the course of that development, the 
inadequacies of the current XML output format have become apparent and I 
would like to solicit feedback on plans for a new XML format.

The new format is radically different, in part to allow processing tools 
to easily distinguish it from the old format and in part to take better 
advantage of XML features and move towards extensible markup.  In the 
new format, tests are collected into a hierarchy of groups, following 
the filesystem structure of the testsuite and any logical groupings 
declared by the test scripts (groups declared by test scripts not yet 
implemented, but I hope to slip the API calls into 1.6.3 as stubs to 
allow early adoption).  Test group names are /-delimited strings and 
internally may cover any (positive) number of levels, but are expected 
to be handled in post-processing such that {foo "bar/baz"} and 
{"foo/bar" baz} are both equivalent to "foo/bar/baz".

The new structure is still in development and no code for it has been 
written yet, but I would like to post a tentative outline representing 
part of a DOM tree for part of DejaGnu's own testsuite to solicit feedback:

- dg:run start="<timestamp>" user="<login name>"
  - dg:platform
    - dg:board role=build name="unix"
      - "x86_64-unknown-linux-gnu"
    - dg:board role=host name="unix"
      - "x86_64-unknown-linux-gnu"
    - dg:board role=target name="unix"
      - "x86_64-unknown-linux-gnu"
    - dg:version element="dejagnu"
      - "1.6.3-git-psql"
    - dg:version element="Expect"
      - "5.45"
    - dg:version element="Tcl"
      - "8.5"
  - dg:group name="runtest"
    - dg:group name="libs"
      - dg:group name="libs"
        - dg:group name="clone_output"
          - dg:test result=PASS
            - dg:name
              - "clone_output(pass) without all_flag set"
          ... other tests omitted ...
    ... other groups omitted ....
  - dg:summary finish="<timestamp>"
    - dg:total result=PASS count="234"

The above example describes a test in the 
"runtest/libs/libs/clone_output" group.  A post-processing tool could 
collapse that group name to "runtest/libs/clone_output" by deleting the 
repeated "libs", but each element in that group name was produced as 
so:  "runtest" was the tool name, the test script was found in 
"runtest.libs" (the first "libs"), the test script was named "libs.exp" 
(the second "libs") and the test script reported a group "clone_output" 
because it ran "clone_output.test" (not yet implemented).

Attributes listed with quotes around the values are CDATA; others are 
enumerated types.  Assume a proper "xmlns:dg" namespace declaration.

Comments?


-- Jacob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.