diff options
Diffstat (limited to 'fastos/src/tests/tests.h')
-rw-r--r-- | fastos/src/tests/tests.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fastos/src/tests/tests.h b/fastos/src/tests/tests.h index e93081eaa53..3a6f2ef9010 100644 --- a/fastos/src/tests/tests.h +++ b/fastos/src/tests/tests.h @@ -1,10 +1,10 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/app.h> #include <vespa/fastos/thread.h> #include <cstring> +#include <csignal> -class BaseTest : public FastOS_Application +class BaseTest { private: BaseTest(const BaseTest&); @@ -13,17 +13,30 @@ private: int totallen; bool _allOkFlag; public: + int _argc; + char **_argv; + const char *okString; const char *failString; BaseTest () : totallen(70), _allOkFlag(true), + _argc(0), + _argv(nullptr), okString("SUCCESS"), failString("FAILURE") { } + virtual int Main() = 0; + + int Entry(int argc, char **argv) { + _argc = argc; + _argv = argv; + return Main(); + } + virtual ~BaseTest() {}; bool allWasOk() const { return _allOkFlag; } |