void FeatureExporter::exportItem(QIODevice &device, const DataProxy::FeatureList &featureList) const { // early out if (!device.isWritable()) { return; } QTextStream otxt(&device); // prepend header if (m_detailLevel.testFlag(FeatureExporter::Extended)) { // identifying comment if (m_detailLevel.testFlag(FeatureExporter::Comments)) { otxt << QString("# %1").arg("ST Viewer export: feature list") << endl; } // prepend data with application version const QString version = QCoreApplication::applicationVersion(); if (m_detailLevel.testFlag(FeatureExporter::Comments)) { otxt << QString("# %1").arg("version") << endl; } otxt << (version.isEmpty() ? QString("0.0.0") : version) << endl; // prepend ISO 8601 compliant timestamp if (m_detailLevel.testFlag(FeatureExporter::Comments)) { otxt << QString("# %1 (UTC)").arg("date") << endl; } otxt << QDateTime::currentDateTimeUtc().toString(Qt::ISODate) << endl; } exportItem(otxt, featureList); }
int main(int argc, char *argv[]) #endif { #ifdef _NO_SYSTEMC_ cout << "SystemC Simulation" << endl; #else sc_report_handler::set_actions("/IEEE_Std_1666/deprecated", SC_DO_NOTHING); #endif /* Setup the strings for filenames file_name : This is the file that has the location of the tests. */ string file_name = "/tests/tests/pret/sys/synchronization/synchronization.txt"; string otxt_name = "rsynchronization.txt"; string txt_name; string load_file; /* Ensure that the include/regression.h set the PRET_ISS path correctly */ if (pret_iss_path != "") { txt_name = pret_iss_path + file_name; ifstream txt(txt_name.c_str()); ofstream otxt(otxt_name.c_str()); if (txt.is_open()) { string line; getline(txt, line); if (line.size() > 0) { if (line.at(0) == '.') { line.erase(line.begin()); } load_file = pret_iss_path + "/tests/tests/pret/sys/synchronization" + line; otxt << load_file << endl; } otxt.close(); } /* Generate the SREC files*/ string compile_srec = pret_iss_path + "/scripts/compile_threads.py " + load_file.c_str() + " -q"; compile_srec = compile_srec + " 2>/dev/null";//cout << "compile command: " << compile_srec << endl; int failed = system(compile_srec.c_str()); if (failed) { cout << "Error: system() failed." << endl; } core db(otxt_name.c_str()); db.run(-1); } else { cout << "Error: regression.h has not set the pret_iss_path string correctly" << endl; } return(0); }