Made the lib directory in the directory of the tester executable the default search dir for test add-ons. It was ./lib before, which didn't allow you to run the tester from another directory.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@335 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2002-07-19 14:14:18 +00:00
parent 07a4996304
commit 68e46d4eb4
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@ int main(int argc, char *argv[]) {
return shell.Run(argc, argv); return shell.Run(argc, argv);
} }
const std::string UnitTesterShell::defaultLibDir = "./lib"; //const std::string UnitTesterShell::defaultLibDir = "./lib";
UnitTesterShell::UnitTesterShell(const std::string &description, SyncObject *syncObject) UnitTesterShell::UnitTesterShell(const std::string &description, SyncObject *syncObject)
: BTestShell(description, syncObject) : BTestShell(description, syncObject)
@ -71,6 +71,7 @@ UnitTesterShell::ProcessArgument(std::string arg, int argc, char *argv[]) {
void void
UnitTesterShell::LoadDynamicSuites() { UnitTesterShell::LoadDynamicSuites() {
// Add the appropriate test lib path // Add the appropriate test lib path
string defaultLibDir = string(GlobalTestDir()) + "/lib";
fLibDirs.insert(defaultLibDir + (doR5Tests ? "_r5" : "")); fLibDirs.insert(defaultLibDir + (doR5Tests ? "_r5" : ""));
// Load away // Load away

View File

@ -8,7 +8,7 @@ class UnitTesterShell : public BTestShell {
public: public:
UnitTesterShell(const std::string &description = "", SyncObject *syncObject = 0); UnitTesterShell(const std::string &description = "", SyncObject *syncObject = 0);
protected: protected:
static const std::string defaultLibDir; // static const std::string defaultLibDir;
bool doR5Tests; bool doR5Tests;
virtual void PrintDescription(int argc, char *argv[]); virtual void PrintDescription(int argc, char *argv[]);
virtual void PrintValidArguments(); virtual void PrintValidArguments();