source: SVN/cambria/redboot/host/tools/ecostest/common/eCosTestUtils.h @ 1

Last change on this file since 1 was 1, checked in by Tim Harvey, 2 years ago

restored latest version of files from server backup

Signed-off-by: Tim Harvey <tharvey@…>

File size: 2.8 KB
Line 
1//####COPYRIGHTBEGIN####
2//                                                                         
3// ----------------------------------------------------------------------------
4// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
5//
6// This program is part of the eCos host tools.
7//
8// This program is free software; you can redistribute it and/or modify it
9// under the terms of the GNU General Public License as published by the Free
10// Software Foundation; either version 2 of the License, or (at your option)
11// any later version.
12//
13// This program is distributed in the hope that it will be useful, but WITHOUT
14// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
16// more details.
17//
18// You should have received a copy of the GNU General Public License along with
19// this program; if not, write to the Free Software Foundation, Inc.,
20// 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21//
22// ----------------------------------------------------------------------------
23//                                                                         
24//####COPYRIGHTEND####
25//=================================================================
26//
27//        eCosTestUtils.h
28//
29//        run test program
30//
31//=================================================================
32//=================================================================
33//#####DESCRIPTIONBEGIN####
34//
35// Author(s):     sdf
36// Contributors:  sdf
37// Date:          1999-04-01
38// Description:   Utiltities for test infra
39// Usage:
40//
41//####DESCRIPTIONEND####
42
43#ifndef _ECOSTESTUTILS_H
44#define _ECOSTESTUTILS_H
45
46#include "eCosStd.h"
47#include "Collections.h"
48
49//=================================================================
50// Various bits and pieces live here
51//=================================================================
52
53class CeCosTestUtils {
54public:
55
56        static bool CommandLine (int &argc,TCHAR **argv,bool bRequireResourceServer=true); // Parse the command line and extract the common options "-v", "-o", ....
57        static void UsageMessage(bool bRequireResourceServer=true); // Output a usage message explaining the above
58 
59  // Find the tail of a filename
60  static LPCTSTR  const Tail (LPCTSTR  const pszFile); // Tail of a filename, in the UNIX sense
61
62  // File exists?
63  static bool Exists (LPCTSTR pszFile);
64  // And is a file? (as opposed to a directory)
65  static bool IsFile (LPCTSTR pszFile);
66
67  // File iterator.  Gets next file in directory, avoiding "." and ".."
68  static bool NextFile (void *&pHandle,String &str);
69  // Start file iteration and return first file.
70  static bool StartSearch (void *&pHandle,String &str);
71  // End file iteration
72  static void EndSearch (void *&pHandle);
73
74  // Get the file name of a "home directory" file
75  static const String HomeFile (LPCTSTR pszFile);
76
77protected:
78 
79};
80
81#endif
Note: See TracBrowser for help on using the repository browser.