RE: [General] Status?

Arnold, Curt writes:
 > There needs to be some pattern so the build can determine which
 > files are test definitions and should be transformed and which
 > files are resource files used in the test and should be copied
 > without transformation.

  I was hoping that Ant would give us something smarter, at least for
XML.  One of the advantages of using different DTDs/schema for
different documents is that you can determine what sort of thing each
represents.  I'd like to see a way to match based on publicId/systemId
and the root element, and dispatch on that.
  Perhaps I should refresh my Java skills by writing an xmldispatch
"action" for Ant:

<target name="process-xml" depends="*.xml">
  <xmldispatch>
    <case rootelement="testcase">
      <!-- convert to xUnit tests -->
      </case>
    <otherwise>
      <!-- copy to some other location -->
      </otherwise>
  </xmldispatch>
</target>

 > Explicitly listing the tests (or excluding the resource files) in
 > build.xml is undesirable.  Running everthing through the transform

  Yes, that can a real problem for maintainability!

 > Using a files subfolder is just a slightly different approach.

  Yes, but the advantage here is that the data remains "close" to the
test itself, and the shape of the tree does not need to be duplicated
(another maintenance task).

 > It is basically the same problem as if you used a .java extension
 > for non-Java files, the build process would become much more
 > complicated since it would assume that those files were Java source
 > code and try to compile them.

  Now just where do you think I'm going to keep those coffee grounds I
was saving???


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation

Received on Friday, 10 August 2001 15:10:41 UTC