blob: bab86ca88563157d94331b65e79767ed12bcb45a (
plain) (
blame)
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
|
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#if ZEN_WITH_TESTS
# include <zencore/iobuffer.h>
# include <zencore/string.h>
# include <zencore/testing.h>
# include <zencore/testutils.h>
# include <zenutil/zenserverprocess.h>
# include <filesystem>
namespace zen::tests {
extern zen::ZenServerEnvironment TestEnv;
// Path to the zen CLI executable, located alongside the running test binary.
std::filesystem::path GetZenExecutablePath();
struct ZenCommandResult
{
int ExitCode = -1;
std::string Output; // combined stdout + stderr
};
// Spawn the zen CLI with the given argument string (without the executable name)
// and capture combined stdout/stderr until exit. Blocks until the process exits.
ZenCommandResult RunZen(std::string_view Args);
} // namespace zen::tests
#endif
|