aboutsummaryrefslogtreecommitdiff
path: root/tests/profiling/GatordMockMain.cpp
blob: b8edeb2b2d3c1092db188a211b721602b05820f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//
// Copyright © 2019 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#include "CommandLineProcessor.hpp"
#include "GatordMockService.hpp"

int main(int argc, char *argv[])
{
    armnn::gatordmock::CommandLineProcessor cmdline;
    if (!cmdline.ProcessCommandLine(argc, argv))
    {
        return EXIT_FAILURE;
    }
    armnn::gatordmock::GatordMockService mockService;
    if (!mockService.OpenListeningSocket(cmdline.GetUdsNamespace()))
    {
        return EXIT_FAILURE;
    }
    int clientFd = mockService.BlockForOneClient();
    if (-1 == clientFd)
    {
        return EXIT_FAILURE;
    }
    return EXIT_SUCCESS;
}