Lines Matching defs:std

141 using std::vector;
152 std::string testPattern;
163 void init (tcu::TestCase* testCase, const std::string& path) override;
171 void reportDurations (tcu::TestContext& testCtx, const std::string& packageName, const deInt64& duration, const std::map<std::string, deUint64>& groupsDurationTime) override;
172 int getCurrentSubprocessCount (const std::string& casePath, int defaultSubprocessCount);
193 std::vector<std::string> m_testsForSubprocess;
199 std::unique_ptr<vksc_server::ipc::Parent> m_parentIPC;
200 std::vector<DetailedSubprocessTestCount> m_detailedSubprocessTestCount;
232 std::string trim (const std::string& original)
234 static const std::string whiteSigns = " \t";
236 if (beg == std::string::npos)
237 return std::string();
259 std::vector<int> caseFraction = testCtx.getCommandLine().getCaseFraction();
260 std::string jsonFileName;
269 jsonFileName = "pipeline_data_" + std::to_string(caseFraction[0]) + ".txt";
275 std::vector<deUint8> input = vksc_server::ipc::Child{portOffset}.GetFile(jsonFileName);
285 if (!testCtx.getCommandLine().isSubProcess() && !std::string(testCtx.getCommandLine().getSubprocessConfigFile()).empty())
287 std::ifstream iFile(testCtx.getCommandLine().getSubprocessConfigFile(), std::ios::in);
289 TCU_THROW(InternalError, (std::string("Missing config file defining number of tests: ") + testCtx.getCommandLine().getSubprocessConfigFile()).c_str());
290 std::string line;
291 while (std::getline(iFile, line))
295 std::size_t pos = line.find_first_of(',');
296 if (pos == std::string::npos)
298 std::string testPattern, testNumber;
299 std::copy(line.begin(), line.begin() + pos, std::back_inserter(testPattern));
301 std::copy(line.begin() + pos + 1, line.end(), std::back_inserter(testNumber));
305 std::istringstream is(testNumber);
312 std::sort(m_detailedSubprocessTestCount.begin(), m_detailedSubprocessTestCount.end(), [](const DetailedSubprocessTestCount& lhs, const DetailedSubprocessTestCount& rhs)
319 if (!std::string(testCtx.getCommandLine().getServerAddress()).empty())
341 if (!std::string(testCtx.getCommandLine().getServerAddress()).empty())
346 std::ostringstream str;
347 str << "#sessionInfo releaseName " << qpGetReleaseName() << std::endl;
348 str << "#sessionInfo releaseId 0x" << std::hex << std::setw(8) << std::setfill('0') << qpGetReleaseId() << std::endl;
349 str << "#sessionInfo targetName \"" << qpGetTargetName() << "\"" << std::endl;
350 str << sessionInfo.get() << std::endl;
351 str << "#beginSession" << std::endl;
353 std::string output = str.str();
383 void TestCaseExecutor::init (tcu::TestCase* testCase, const std::string& casePath)
449 std::ostringstream disasm;
473 std::ostringstream disasm;
521 if (m_testsForSubprocess.size() >= std::size_t(currentSubprocessCount))
541 std::lock_guard<std::mutex> lock(Context::m_faultDataMutex);
565 std::vector<VkFaultData> faultData(faultCount);
610 std::string message;
620 message = std::string("Unused shaders: ") + message;
696 void TestCaseExecutor::reportDurations(tcu::TestContext& testCtx, const std::string& packageName, const deInt64& duration, const std::map<std::string, deUint64>& groupsDurationTime)
703 std::ostringstream str;
705 str << std::endl;
706 str << "#beginTestsCasesTime" << std::endl;
708 str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
709 str << "<TestsCasesTime>" << std::endl;
711 str << " <Number Name=\"" << packageName << "\" Description=\"Total tests case duration in microseconds\" Tag=\"Time\" Unit=\"us\">" << duration << "</Number>" << std::endl;
712 for (std::map<std::string, deUint64>::const_iterator it = groupsDurationTime.begin(); it != groupsDurationTime.end(); ++it)
713 str << " <Number Name=\"" << it->first << "\" Description=\"The test group case duration in microseconds\" Tag=\"Time\" Unit=\"us\">" << it->second << "</Number>" << std::endl;
714 str << "</TestsCasesTime>" << std::endl;
715 str << std::endl;
716 str << "#endTestsCasesTime" << std::endl;
717 str << std::endl;
718 str << "#endSession" << std::endl;
720 std::string output = str.str();
732 int TestCaseExecutor::getCurrentSubprocessCount(const std::string& casePath, int defaultSubprocessCount)
753 std::vector<int> caseFraction = testCtx.getCommandLine().getCaseFraction();
754 std::ostringstream jsonFileName, qpaFileName, pipelineCompilerOutFileName, pipelineCompilerLogFileName, pipelineCompilerPrefix;
759 if (!std::string(testCtx.getCommandLine().getPipelineCompilerPath()).empty())
770 if (!std::string(testCtx.getCommandLine().getPipelineCompilerPath()).empty())
782 std::vector<deUint8> data = m_resourceInterface->exportData();
787 std::string newCmdLine;
789 std::string appName = testCtx.getCommandLine().getApplicationName();
796 if (!std::string(testCtx.getCommandLine().getPipelineCompilerPath()).empty())
798 newCmdLine += " --deqp-pipeline-compiler=" + std::string(testCtx.getCommandLine().getPipelineCompilerPath());
800 if (!std::string(testCtx.getCommandLine().getPipelineCompilerDataDir()).empty())
801 newCmdLine += " --deqp-pipeline-dir=" + std::string(testCtx.getCommandLine().getPipelineCompilerDataDir());
805 if (!std::string(testCtx.getCommandLine().getPipelineCompilerArgs()).empty())
806 newCmdLine += " --deqp-pipeline-args=\"" + std::string( testCtx.getCommandLine().getPipelineCompilerArgs() ) + "\"";
812 std::string originalCmdLine = testCtx.getCommandLine().getInitialCmdLine();
816 std::string paramStr ("--deqp");
817 std::vector<std::string> skipElements =
830 std::size_t pos = 0;
831 std::vector<std::size_t> argPos;
832 while ((pos = originalCmdLine.find(paramStr, pos)) != std::string::npos)
837 std::vector<std::string> args;
838 for (std::size_t i = 0; i < argPos.size()-1; ++i)
840 std::string s = originalCmdLine.substr(argPos[i], argPos[i + 1] - argPos[i]);
841 std::size_t found = s.find_last_not_of(' ');
842 if (found != std::string::npos)
848 for (std::size_t i = 0; i < args.size(); ++i)
864 std::string subprocessTestList;
874 std::string caseListName = "subcaselist" + (caseFraction.empty() ? std::string("") : de::toString(caseFraction[0])) + ".txt";
886 std::string subProcessExitCodeInfo;
891 std::string err = deProcess_getLastError(process);
896 std::string whole;
899 // create a separate thread that captures std::err output
900 de::MovePtr<std::thread> errThread(new std::thread([&process]
924 std::stringstream s;
926 s << " Subprocess failed with exit code " << exitCode << "(" << std::hex << exitCode << ")";
937 std::ifstream subQpa(qpaFileName.str(), std::ios::binary);
938 std::string subQpaText{std::istreambuf_iterator<char>(subQpa),
939 std::istreambuf_iterator<char>()};
941 std::string beginText ("#beginTestCaseResult");
942 std::string endText ("#endTestCaseResult");
943 std::size_t beginPos = subQpaText.find(beginText);
944 std::size_t endPos = subQpaText.rfind(endText);
945 if (beginPos == std::string::npos || endPos == std::string::npos)
948 std::string subQpaCopy = "\n" + std::string(subQpaText.begin() + beginPos, subQpaText.begin() + endPos + endText.size()) + "\n";
950 if (!std::string(testCtx.getCommandLine().getServerAddress()).empty())
976 std::string beginStat ("#SubProcessStatus");
977 std::size_t beginPos = subQpaText.find(beginStat);
978 if (beginPos == std::string::npos)
981 std::string subQpaStat (subQpaText.begin() + beginPos + beginStat.size(), subQpaText.end());
983 std::istringstream str(subQpaStat);
1039 std::string("vulkan/glsl/es310/") + s_es310Tests[ndx].name + ".test").release());
1054 std::string("vulkan/glsl/440/") + s_440Tests[ndx].name + ".test").release());
1141 tcu::TestCaseGroup* createGlslTests (tcu::TestContext& testCtx, const std::string& name)