summaryrefslogtreecommitdiff
path: root/source/compiler-core/slang-test-server-protocol.h
blob: b74a1a8727e211639cfe3ea1240b8bfcfb9157db (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef SLANG_COMPILER_CORE_TEST_PROTOCOL_H
#define SLANG_COMPILER_CORE_TEST_PROTOCOL_H

#include "slang.h"
#include "slang-com-helper.h"
#include "slang-com-ptr.h"

#include "../core/slang-rtti-info.h"
#include "slang-json-value.h"

namespace TestServerProtocol {

using namespace Slang;

struct ExecuteUnitTestArgs
{
    String moduleName;
    String testName;
    uint32_t enabledApis;

    static const UnownedStringSlice g_methodName;
    static const StructRttiInfo g_rttiInfo;
};

struct ExecuteToolTestArgs
{
    String toolName;                ///< The name of the tool (will be a shared library typically - like render-test). Doesn't need -tool suffix.
    List<String> args;                          ///< Arguments passed to the tool during exectution

    static const UnownedStringSlice g_methodName;
    static const StructRttiInfo g_rttiInfo;
};

struct QuitArgs
{
    static const UnownedStringSlice g_methodName;
};

struct ExecutionResult
{
    String stdOut;
    String stdError;
    int32_t result = SLANG_OK;
    int32_t returnCode = 0;                         ///< As returned if invoked as command line

    static const StructRttiInfo g_rttiInfo;
};

} // namespace Slang

#endif // SLANG_COMPILER_CORE_TEST_PROTOCOL_H