* See the License for the specific language governing permissions and
* limitations under the License
*/
-#include <unistd.h>
-#include <sys/types.h>
#include <fstream>
#include <iostream>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include <tzplatform_config.h>
-
namespace {
const int USER_APP = 5001;
int main(int argc, char *argv[])
{
- uid_t expected_uid = tzplatform_getuid(TZ_SYS_DEFAULT_USER);
- if (expected_uid != geteuid()) {
- std::string userStr("owner");
- const char* user = tzplatform_getenv(TZ_SYS_DEFAULT_USER);
- if (user)
- userStr = user;
-
- std::cerr << argv[0] << " should be executed as " << userStr << ". Aborting" << std::endl;
- return -1;
- }
+ require_default_user(argv);
int exitCode = DPL::Test::TestRunnerSingleton::Instance().ExecTestRunner(argc, argv);