You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Pa...@lotus.com on 2001/11/07 13:49:29 UTC

Re: The Xalan test suite

Peter,

I'm glad to get a second set of eyes looking at this code.   Dave Bertoni
had similar criticisms,  and I added some comments to the files.  But let
me explain the secret.   The code expects the directory to be at the root
level,  but does not require the initial slash.

So in your case call the conformance test the following way;
     conf TempXalanAndXerces\xml-xalan\test\tests\conf

Now the conformance test will automatically run a transform on the results
and spit out the results in html.  If that doesn't work let me know.

Paul


                                                                                                                       
                    "Peter Murphy"                                                                                     
                    <peterm@fast.fujit       To:     <xa...@xml.apache.org>                                        
                    su.com.au>               cc:     (bcc: Paul Dick/CAM/Lotus)                                        
                                             Subject:     The Xalan test suite                                         
                    11/07/2001 01:33                                                                                   
                    AM                                                                                                 
                    Please respond to                                                                                  
                    xalan-dev                                                                                          
                                                                                                                       
                                                                                                                       




All,

I've attempted to compile and run the projects with the latest build of
xml-xalan\c\Tests\Test.dsw. All now compile. Unfortunately, with the
exception of ThreadTest.dsp, none of them seem to work. And with the
exception of Transformer.dsp (which uses absolute path file names in its
code - path names that don't correspond to those in my machine), they fail
in EXACTLY the same way. Here's what seems to be happening...

Most of the programs take several command line arguments. One argument is
mandatory: the base directory for test cases. If no arguments are provided,
you get a display like this:

-------------------------------------------------------
Using Xerces Version 1_5_2

conf dirname [-category -out -gold]

dirname         (base directory for testcases)
-category dirname (specific directory)
-out dirname    (base directory for output)
-gold dirname   (base directory for gold files)
Press any key to continue
--------------------------------------------------------

Since my conf test files appear to be in
"C:\TempXalanAndXerces\xml-xalan\test\tests\conf", I ran
"conf C:\TempXalanAndXerces\xml-xalan\test\tests\conf". I got the following
message:

--------------------------------------------------------------
Given base directory "C:\TempXalanAndXerces\xml-xalan\test\tests\conf" does
not
exist
--------------------------------------------------------------

Stepping through the code, I noticed that main called a getParams routine
to
evaluate the command line arguments:

---------------------------------------------------------------
main(
            int                                argc,
            const char*        argv[])

/* Setup */

           FileUtility f;

           if (getParams(argc, argv, f, baseDir, outputRoot, category,
skip,
iterCount) == true)
           {

/* Does all the testing here. */

           }

---------------------------------------------------------------
And getParams called f.checkDir:
---------------------------------------------------------------

bool
getParams(int argc,  const char*          argv[], /*...*/ )
{
/* [...] */
                     if (f.checkDir(pathSep + XalanDOMString(argv[1])))
                     {
                               assign(baseDir, XalanDOMString(argv[1]));
                               insert(baseDir, 0, pathSep);
                     }
                     else
                     {
                               cout << endl << "Given base directory \""
<< argv[1] << "\" does not
exist" << endl;
                               printArgOptions();
                               return false;
                     }
           }

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

The effect seem to be: concatename a '\' character to the FRONT of the
directory name, and see if it is valid. Unfortunately,
"\C:\TempXalanAndXerces\xml-xalan\test\tests\conf" is not a valid directory
name on Windoze machines, so getParams fails, and thus the program fails.

The odd thing is that the pattern "main calling getParams(argc, argv)
calling f.checkDir(pathSep + XalanDOMString(argv[1]))" is repeated in most
of the test programs: conf, compare, dom2dom, etc. I thought it would be
logical to call "f.checkDir(XalanDOMString(argv[1]))" instead.

Anyway, I think that's the end of my ramble. I'll get to the questions:

(a) Am I calling the program right? Is just one parameter sufficient?

(b) Why is an initial slash added to path name in calling f.checkDir? Is it
for Unix compatibility?

(c) Is there anything I can do to correct this problem?

Any help would be appreciated.

Regards,
Peter.






RE: The Xalan test suite

Posted by Peter Murphy <pe...@fast.fujitsu.com.au>.
> -----Original Message-----
> From: Paul_Dick@lotus.com [mailto:Paul_Dick@lotus.com]
>
>
> Peter,
>
> I'm glad to get a second set of eyes looking at this code.   Dave Bertoni
> had similar criticisms,  and I added some comments to the files.  But let
> me explain the secret.   The code expects the directory to be at the root
> level,  but does not require the initial slash.
>
> So in your case call the conformance test the following way;
>      conf TempXalanAndXerces\xml-xalan\test\tests\conf
>
> Now the conformance test will automatically run a transform on the results
> and spit out the results in html.  If that doesn't work let me know.
>

Paul,

It worked! Thank you very much for your help.

However, that brings up a question: do you (or does anyone else) want a
print out of the results? I've been trying to concentrate on the
compatibility with Xerces 1.5.2; I don't know if anyone else is attempting
the same.

By the way, a summary of the conf results for my system (Win2K+MSVC6SP3+D;
no ICU) are:

Passed 1423
Failed 55
Missing Gold 0

Regards,
Peter.