FreeNOS
|
Scan directory for automated tests. More...
#include <DirectoryScanner.h>
Public Member Functions | |
DirectoryScanner (int argc, char **argv) | |
Constructor. More... | |
~DirectoryScanner () | |
Destructor. More... | |
int | scan (const char *path) |
Scan filesystem path for tests. More... | |
Private Attributes | |
int | m_argc |
Program argument count. More... | |
char ** | m_argv |
Program argument values. More... | |
Index< ExternalTest, MaximumExternalTests > | m_externalTests |
External tests that are detected. More... | |
Static Private Attributes | |
static const Size | MaximumExternalTests = 512u |
Maximum number of external tests. More... | |
Scan directory for automated tests.
Definition at line 36 of file DirectoryScanner.h.
DirectoryScanner::DirectoryScanner | ( | int | argc, |
char ** | argv | ||
) |
Constructor.
argc | Program argument count |
argv | Program argument values |
Definition at line 28 of file DirectoryScanner.cpp.
DirectoryScanner::~DirectoryScanner | ( | ) |
Destructor.
Definition at line 34 of file DirectoryScanner.cpp.
References Index< T, N >::deleteAll(), and m_externalTests.
int DirectoryScanner::scan | ( | const char * | path | ) |
Scan filesystem path for tests.
path | Input filesystem path |
Definition at line 39 of file DirectoryScanner.cpp.
References closedir(), dirent::d_name, dirent::d_type, DT_DIR, DT_REG, String::endsWith(), errno, EXIT_FAILURE, EXIT_SUCCESS, Index< T, N >::insert(), m_argc, m_argv, m_externalTests, opendir(), printf(), readdir(), snprintf(), and strerror().
|
private |
Program argument count.
Definition at line 70 of file DirectoryScanner.h.
Referenced by DirectoryScanner(), and scan().
|
private |
Program argument values.
Definition at line 73 of file DirectoryScanner.h.
Referenced by DirectoryScanner(), and scan().
|
private |
External tests that are detected.
Definition at line 76 of file DirectoryScanner.h.
Referenced by scan(), and ~DirectoryScanner().
|
staticprivate |
Maximum number of external tests.
Definition at line 41 of file DirectoryScanner.h.