From: Larry W. V. <lv...@ca...> - 2002-08-15 13:33:46
|
Okay, I decided to just run the configure in tcldom-2.2/src and see what happened. I got it to configure, the code built (with lots of warnings about prototype problems - but I'm using Tcl 8.4 b2 so that doesn't surprise me). Then I did a make test and got this as the summary: all.tcl: Total 326 Passed 159 Skipped 144 Failed 23 Sourced 11 Test Files. Files with failing tests: DOMImplementation.test element.test node.test parse.te st serialization.test xmlswitch.test zzlast.test Number of tests skipped for each constraint: 114 dom_c 1 dom_libxml2 13 dom_tcl 1 dom_tcl || dom_libxml2 2 dom_tcl || tcl_libxml2 2 emptyTest 3 knownBug 8 as some of the failed tests include: /usr/ccs/bin/ld -G -z text -o tcldom2.0g.so -R /usr/tcl84/lib \ tcldompro.o tdpExpat.o traversal.o livelist.o -L/usr/tcl84/lib -lexpat0. 2 -L/usr/tcl84/lib -ltclstub8.4g -L/usr/tcl84/lib -ltclstub8.4g TCLLIBPATH=`pwd` ; export TCLLIBPATH ; \ (cd ../tests ; \ /usr/tcl84/bin/tclsh8.4 all.tcl -verbose b) 2>&1 | tee test.log DOMImplementation.test Loaded dom version 2.2 via { if {[catch {package require dom::generic 2.2}]} { package require dom::tclgeneric } else { catch {package require dom::c} catch {package require dom::libxml2 2.2} } package provide dom 2.2 # Both the C and pure Tcl versions of the generic layer # make use of the Tcl implementation. package require dom::tcl } ==== DOMImplementation-3.5 destroy an element node FAILED ==== Contents of test case: set doc [dom::DOMImplementation create] set root [dom::document createElement $doc top] set node1 [dom::document createElement $root node] set node2 [dom::document createElement $root node] dom::node removeChild $root $node1 dom::DOMImplementation destroy $node1 dom::DOMImplementation serialize $doc ---- Result was: <?xml version='1.0'?> <!DOCTYPE top> <top><node/></top> ---- Result should have been (exact matching): <?xml version="1.0"?> <!DOCTYPE top> <top><node/></top> ==== DOMImplementation-3.5 FAILED error "no element found" at line 1 character 0 while executing "$parser parse [lindex $args 0]" doctype.test document.test element.test ==== element-4.1 getAttribute FAILED ==== Contents of test case: dom::element getAttribute $e1 class ---- Result was: ---- Result should have been (exact matching): success ==== element-4.1 FAILED node.test ==== node-4.1 cget -childNodes FAILED ==== Contents of test case: set [::dom::node cget $doc -childNodes] ---- Result was: ::dom::tcl::document10(node3) ::dom::tcl::document10(node2) ---- Result should have been (exact matching): ::dom::tcl::document10(node2) ==== node-4.1 FAILED ==== node-4.4 cget -childNodes textNode FAILED ==== Contents of test case: set [::dom::node cget $child2 -childNodes] ---- Result was: can't read "": no such variable ---- Result should have been (exact matching): ---- Test completed normally; Return code was: 0 ---- Return code should have been one of: 0 2 ==== node-4.4 FAILED ==== node-4.5 configure -childNodes FAILED ==== Contents of test case: set [::dom::node configure $doc -childNodes] ---- Result was: ::dom::tcl::document10(node3) ::dom::tcl::document10(node2) ---- Result should have been (exact matching): ::dom::tcl::document10(node2) ==== node-4.5 FAILED ==== node-4.8 cget -childNodes textNode FAILED ==== Contents of test case: set [::dom::node configure $child2 -childNodes] ---- Result was: can't read "": no such variable ---- Result should have been (exact matching): ---- Test completed normally; Return code was: 0 ---- Return code should have been one of: 0 2 and so on - I can send all the errors if that seems useful. Anyone with an idea what might be going wrong? -- Tcl'2002 Sept 16, 2002, Vancouver, BC http://www.tcl.tk/community/tcl2002/ Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |
From: Steve B. <Ste...@zv...> - 2002-08-16 03:01:20
|
Larry W. Virden wrote: > Okay, I decided to just run the configure in tcldom-2.2/src and see what > happened. That's Joe English's code, so I can't really comment much on it. > I got it to configure, the code built (with lots of warnings > about prototype problems - but I'm using Tcl 8.4 b2 so that doesn't > surprise me). > > Then I did a make test and got this as the summary: Before releasing 2.2 I went through the test suite and updated to tcltest 2.1. I allocated constraints, dom_tcl, dom_c and dom_libxml2, to many of the tests to account for differences in the subpackages capabilities and inconsistencies. This work is not yet complete; the fact that only 23 failed is pretty good ;-) In order to get the tests functioning properly, you must enable one of the constraints. Start a tclsh and load the DOM implementation you wish to test, eg. 'package require dom::c'. Then 'source all.tcl' and ignore the results. Then type 'testConstraint dom_c 1' and run 'source all.tcl' again and you will get a true error count. You can do a similar thing to test the all-Tcl implementation. I have yet to set this up in a convenient script (but like I said before, "It works for me"). If you look closely at the failures, you'll notice that with some of them the difference is in different serialization of the DOM tree into XML. In fact, these are not really failures since the XML is equivalent. However, Tcl is testing with character-by-character exactness. For example: <?xml version='1.0'?> <Test some="attribute"/> is *exactly* the same document as <?xml version="1.0"?> <Test some='attribute'/> even though syntactically they are different. Technically speaking, TclDOM works at the XML Infoset level, rather than the raw XML syntax level. Also, I've already committed fixes for a couple of those errors. Cheers, Steve Ball > all.tcl: Total 326 Passed 159 Skipped 144 Failed 23 > Sourced 11 Test Files. > Files with failing tests: DOMImplementation.test element.test node.test parse.te > st serialization.test xmlswitch.test zzlast.test > Number of tests skipped for each constraint: > 114 dom_c > 1 dom_libxml2 > 13 dom_tcl > 1 dom_tcl || dom_libxml2 > 2 dom_tcl || tcl_libxml2 > 2 emptyTest > 3 knownBug > 8 as > > some of the failed tests include: > /usr/ccs/bin/ld -G -z text -o tcldom2.0g.so -R /usr/tcl84/lib \ > tcldompro.o tdpExpat.o traversal.o livelist.o -L/usr/tcl84/lib -lexpat0. > 2 -L/usr/tcl84/lib -ltclstub8.4g -L/usr/tcl84/lib -ltclstub8.4g > TCLLIBPATH=`pwd` ; export TCLLIBPATH ; \ > (cd ../tests ; \ > /usr/tcl84/bin/tclsh8.4 all.tcl -verbose b) 2>&1 | tee test.log > DOMImplementation.test > Loaded dom version 2.2 via { > if {[catch {package require dom::generic 2.2}]} { > package require dom::tclgeneric > } else { > catch {package require dom::c} > catch {package require dom::libxml2 2.2} > } > package provide dom 2.2 > > # Both the C and pure Tcl versions of the generic layer > # make use of the Tcl implementation. > > package require dom::tcl > } > > ==== DOMImplementation-3.5 destroy an element node FAILED > ==== Contents of test case: > > set doc [dom::DOMImplementation create] > set root [dom::document createElement $doc top] > set node1 [dom::document createElement $root node] > set node2 [dom::document createElement $root node] > dom::node removeChild $root $node1 > dom::DOMImplementation destroy $node1 > > dom::DOMImplementation serialize $doc > ---- Result was: > <?xml version='1.0'?> > <!DOCTYPE top> > <top><node/></top> > ---- Result should have been (exact matching): > <?xml version="1.0"?> > <!DOCTYPE top> > <top><node/></top> > > ==== DOMImplementation-3.5 FAILED > > error "no element found" at line 1 character 0 > while executing > "$parser parse [lindex $args 0]" > doctype.test > document.test > element.test > ==== element-4.1 getAttribute FAILED > ==== Contents of test case: > > dom::element getAttribute $e1 class > > ---- Result was: > > ---- Result should have been (exact matching): > success > ==== element-4.1 FAILED > node.test > > ==== node-4.1 cget -childNodes FAILED > ==== Contents of test case: > > set [::dom::node cget $doc -childNodes] > > ---- Result was: > ::dom::tcl::document10(node3) ::dom::tcl::document10(node2) > ---- Result should have been (exact matching): > ::dom::tcl::document10(node2) > ==== node-4.1 FAILED > > ==== node-4.4 cget -childNodes textNode FAILED > ==== Contents of test case: > > set [::dom::node cget $child2 -childNodes] > > ---- Result was: > can't read "": no such variable > ---- Result should have been (exact matching): > > ---- Test completed normally; Return code was: 0 > ---- Return code should have been one of: 0 2 > ==== node-4.4 FAILED > > ==== node-4.5 configure -childNodes FAILED > ==== Contents of test case: > > set [::dom::node configure $doc -childNodes] > > ---- Result was: > ::dom::tcl::document10(node3) ::dom::tcl::document10(node2) > ---- Result should have been (exact matching): > ::dom::tcl::document10(node2) > ==== node-4.5 FAILED > > ==== node-4.8 cget -childNodes textNode FAILED > ==== Contents of test case: > > set [::dom::node configure $child2 -childNodes] > > ---- Result was: > can't read "": no such variable > ---- Result should have been (exact matching): > > ---- Test completed normally; Return code was: 0 > ---- Return code should have been one of: 0 2 > > and so on - I can send all the errors if that seems useful. > > Anyone with an idea what might be going wrong? -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: Joe E. <jen...@fl...> - 2002-08-20 05:37:20
|
[Sorry for the late reply -- I just got back from vacation] On Thu, 15 Aug 2002, Larry W. Virden wrote: > Okay, I decided to just run the configure in tcldom-2.2/src and see what > happened. I got it to configure, the code built (with lots of warnings > about prototype problems - but I'm using Tcl 8.4 b2 so that doesn't > surprise me). > > Then I did a make test and got this as the summary: > > all.tcl: Total 326 Passed 159 Skipped 144 Failed 23 > Sourced 11 Test Files. > Files with failing tests: [...] > some of the failed tests include: > [...] > and so on - I can send all the errors if that seems useful. > > Anyone with an idea what might be going wrong? Executive summary: Steve enhanced the test suite, and Joe hasn't gotten around to updating tcldom/src to match it yet. If tcldom/src compiles, links, and installs without any hard errors, then you can (probably) safely ignore test suite failures. As Steve has mentioned, tcldom/src holds a separate code base, which is _supposed_ to be compatible with the main TclDOM distribution, but might not be due to different maintenance schedules. In this case, tcldom/src has not had any significant changes since the 2.0 release, so whatever worked before should continue to work now. (I don't yet know what's new in TclDOM 2.2, so new code written to take advantage of the 2.2 API might not work with the package provided by tcldom/src). --Joe English jen...@fl... |