void Screen::initEnv() { initGlfwEnv(); initGlewEnv(); initGLOptions(); envInfo(); }
QString QmlCovPlugin::coverageFilePath() { QString envPath = qgetenv("QTCOV_COVERAGE_DATA_PATH"); if (!envPath.isEmpty()) { QFileInfo envInfo(envPath); if (envInfo.exists() && envInfo.isReadable() && envInfo.isWritable()) { return envPath; } qCritical() << "Could not use coverage data from" << envPath; } QString defaultName = "coverage_data.json"; QFileInfo currentDirInfo(defaultName); if (currentDirInfo.exists() && currentDirInfo.isReadable() && currentDirInfo.isWritable()) { return QDir::current().absoluteFilePath(defaultName); } else { qWarning() << "Could not use coverage data from" << QDir::current().absoluteFilePath(defaultName); } QFileInfo appDirInfo(QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(defaultName)); if (appDirInfo.exists() && appDirInfo.isReadable() && appDirInfo.isWritable()) { return appDirInfo.absoluteFilePath(); } else { qWarning() << "Could not use coverage data from" << appDirInfo.absoluteFilePath(); } return defaultName; }
void MixClient::executeTransaction(Transaction const& _t, Block& _block, bool _call, bool _gasAuto, Secret const& _secret) { Transaction t = _gasAuto ? replaceGas(_t, m_postMine.gasLimitRemaining()) : _t; // do debugging run first EnvInfo envInfo(bc().info(), bc().lastHashes()); ExecutionResult d = debugTransaction(t, _block.state(), envInfo, _call); // execute on a state if (!_call) { t = _gasAuto ? replaceGas(_t, d.gasUsed, _secret) : _t; eth::ExecutionResult const& er = _block.execute(envInfo.lastHashes(), t); if (t.isCreation() && _block.state().code(d.contractAddress).empty()) BOOST_THROW_EXCEPTION(OutOfGas() << errinfo_comment("Not enough gas for contract deployment")); d.gasUsed = er.gasUsed + er.gasRefunded + er.gasForDeposit + c_callStipend; LocalisedLogEntries logs; TransactionReceipt const& tr = _block.receipt(_block.pending().size() - 1); LogEntries le = tr.log(); if (le.size()) for (unsigned j = 0; j < le.size(); ++j) logs.insert(logs.begin(), LocalisedLogEntry(le[j])); d.logs = logs; } WriteGuard l(x_executions); m_executions.emplace_back(std::move(d)); }