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
|
// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef LIBBRILLO_BRILLO_PROCESS_MOCK_H_
#define LIBBRILLO_BRILLO_PROCESS_MOCK_H_
#include <string>
#include <base/files/file_path.h>
#include <gmock/gmock.h>
#include "brillo/process.h"
namespace brillo {
class ProcessMock : public Process {
public:
ProcessMock() {}
virtual ~ProcessMock() {}
MOCK_METHOD(void, AddArg, (const std::string&), (override));
MOCK_METHOD(void, RedirectInput, (const std::string&), (override));
MOCK_METHOD(void, RedirectOutput, (const std::string&), (override));
MOCK_METHOD(void, RedirectUsingPipe, (int, bool), (override));
MOCK_METHOD(void, BindFd, (int, int), (override));
MOCK_METHOD(void, SetUid, (uid_t), (override));
MOCK_METHOD(void, SetGid, (gid_t), (override));
MOCK_METHOD(void, SetCapabilities, (uint64_t), (override));
MOCK_METHOD(void, ApplySyscallFilter, (const std::string&), (override));
MOCK_METHOD(void, EnterNewPidNamespace, (), (override));
MOCK_METHOD(void, SetInheritParentSignalMask, (bool), (override));
MOCK_METHOD(void, SetPreExecCallback, (const PreExecCallback&), (override));
MOCK_METHOD(void, SetSearchPath, (bool), (override));
MOCK_METHOD(int, GetPipe, (int), (override));
MOCK_METHOD(bool, Start, (), (override));
MOCK_METHOD(int, Wait, (), (override));
MOCK_METHOD(int, Run, (), (override));
MOCK_METHOD(pid_t, pid, (), (override));
MOCK_METHOD(bool, Kill, (int, int), (override));
MOCK_METHOD(void, Reset, (pid_t), (override));
MOCK_METHOD(bool, ResetPidByFile, (const std::string&), (override));
MOCK_METHOD(pid_t, Release, (), (override));
MOCK_METHOD(void, SetCloseUnusedFileDescriptors, (bool), (override));
};
} // namespace brillo
#endif // LIBBRILLO_BRILLO_PROCESS_MOCK_H_
|