pauldick    01/12/13 12:18:08

  Modified:    c/Tests/Harness FileUtility.cpp FileUtility.hpp
  Log:
  Added flag to getParams to check for gold dir,  and now use checkdir
  not checkandcreatedir.
  
  Revision  Changes    Path
  1.31      +14 -4     xml-xalan/c/Tests/Harness/FileUtility.cpp
  
  Index: FileUtility.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/Tests/Harness/FileUtility.cpp,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- FileUtility.cpp   2001/12/12 21:01:50     1.30
  +++ FileUtility.cpp   2001/12/13 20:18:08     1.31
  @@ -139,11 +139,11 @@
   bool
   FileUtility::getParams(int argc, 
                  const char*   argv[],
  -               char* outDir)
  +               char*                 outDir,
  +               bool                  fsetGold)
   {
        bool fSuccess = true;   // Used to continue argument loop
        bool fsetOut = true;    // Set default output directory, set to false if data 
is provided
  -     bool fsetGold = true;   // Set default gold directory, set to false if data is 
provided
   
        args.skip = true;               // Default values for performance testing 
parameters.
        args.iters = 3;                 
  @@ -195,8 +195,14 @@
                        if(i < argc && argv[i][0] != '-')
                        {
                                assign(args.gold, XalanDOMString(argv[i]));
  +
  +                             if ( !checkDir(args.gold) )
  +                             {       
  +                                     cout << "Given Gold dir - " << 
c_str(TranscodeToLocalCodePage(args.gold)) << " - does not exist" << endl;
  +                                     fSuccess = false;
  +                             }
  +
                                append(args.gold, pathSep);
  -                             checkAndCreateDir(args.gold);
                                fsetGold = false;
                        }
                        else
  @@ -294,7 +300,11 @@
        {
                args.gold = args.base;
                append(args.gold,XalanDOMString("-gold"));
  -             checkAndCreateDir(args.gold);
  +             if ( !checkDir(args.gold) )
  +             {       
  +                     cout << "Assumed Gold dir - " << 
c_str(TranscodeToLocalCodePage(args.gold)) << " - does not exist" << endl;
  +                     fSuccess = false;
  +             }
                append(args.gold,pathSep);
        }
        
  
  
  
  1.25      +5 -2      xml-xalan/c/Tests/Harness/FileUtility.hpp
  
  Index: FileUtility.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/Tests/Harness/FileUtility.hpp,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- FileUtility.hpp   2001/12/12 21:01:50     1.24
  +++ FileUtility.hpp   2001/12/13 20:18:08     1.25
  @@ -101,7 +101,7 @@
   /**
    * Utility call that extracts test file names from testsuite.  
    * @author Paul [EMAIL PROTECTED]
  - * @version $Id: FileUtility.hpp,v 1.24 2001/12/12 21:01:50 pauldick Exp $
  + * @version $Id: FileUtility.hpp,v 1.25 2001/12/13 20:18:08 pauldick Exp $
    */
   
   #if !defined(WIN32)
  @@ -193,7 +193,10 @@
        getDrive();
   
        bool
  -     getParams(int argc, const char* argv[], char* outDir);
  +     getParams(      int                     argc, 
  +                             const char*     argv[], 
  +                             char*           outDir,
  +                             bool            fsetGold = true);
   
   
        FileNameVectorType
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to