Lines Matching refs:string

34 std::string ExecuteCommands(const std::string& cmds)
40 std::string cmdLog = "";
54 bool ExecuteCommands(const std::string& cmds, std::vector<std::string>& ress)
70 ress.push_back(std::string(res));
76 int GetProcessPid(const std::string& processName)
78 std::string cmd = "pidof " + processName;
79 std::string pidStr = ExecuteCommands(cmd);
87 int LaunchTestHap(const std::string& abilityName, const std::string& bundleName)
89 std::string launchCmd = "/system/bin/aa start -a " + abilityName + " -b " + bundleName;
95 void StopTestHap(const std::string& bundleName)
97 std::string stopCmd = "/system/bin/aa force-stop " + bundleName;
101 void InstallTestHap(const std::string& hapName)
103 std::string installCmd = "bm install -p " + hapName;
107 void UninstallTestHap(const std::string& bundleName)
109 std::string uninstallCmd = "bm uninstall -n " + bundleName;
113 int CountLines(const std::string& fileName)
121 std::string tmpuseValue;
130 bool CheckProcessComm(int pid, const std::string& name)
132 std::string cmd = "cat /proc/" + std::to_string(pid) + "/comm";
133 std::string comm = ExecuteCommands(cmd);
135 if (pos != std::string::npos) {
144 int CheckKeyWords(const std::string& filePath, std::string *keywords, int length, int minRegIdx)
149 std::vector<std::string> t(lines * 4); // 4 : max string blocks of one line
152 std::string::size_type idx;
158 if (idx != std::string::npos) {
180 bool CheckContent(const std::string& content, const std::string& keyContent, bool checkExist)
183 if (content.find(keyContent) != std::string::npos) {
199 int GetKeywordsNum(const std::string& msg, std::string *keywords, int length)
202 std::string::size_type idx;
205 if (idx != std::string::npos) {
212 std::string GetCppCrashFileName(const pid_t pid, const std::string& tempPath)
214 std::string filePath = "";
218 std::string fileNamePrefix = "cppcrash-" + std::to_string(pid);
219 std::vector<std::string> files;
222 if (file.find(fileNamePrefix) != std::string::npos) {
232 std::string path = "/proc/self/smaps_rollup";
233 std::string content;
239 std::vector<std::string> result;
242 [] (const std::string& str) {
243 return str.find("Pss:") != std::string::npos;
250 std::string pss = *iter;
263 std::string path = std::string(PROC_SELF_MAPS_PATH);
264 std::string content;
270 std::vector<std::string> result;
277 std::string path = "/proc/self/fd";
278 std::vector<std::string> content;