Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/whereDidMyBenchGo into lp:ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1506
Merged at revision: 1506
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/whereDidMyBenchGo
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 69 lines (+7/-10)
1 file modified
tests/unit/tst_components_benchmark/tst_components_benchmark.cpp (+7/-10)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/whereDidMyBenchGo
Reviewer Review Type Date Requested Status
Zsombor Egri Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+258925@code.launchpad.net

Commit message

Add version subfolder to benchmark test paths

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

A small request inline, and we're good.

review: Needs Fixing
1506. By Cris Dywan

Use macros instead of hard-coding latest version

Revision history for this message
Zsombor Egri (zsombi) wrote :

Looks good now. Thx!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/unit/tst_components_benchmark/tst_components_benchmark.cpp'
--- tests/unit/tst_components_benchmark/tst_components_benchmark.cpp 2014-11-25 09:58:33 +0000
+++ tests/unit/tst_components_benchmark/tst_components_benchmark.cpp 2015-05-15 09:59:19 +0000
@@ -22,6 +22,7 @@
2222
23#include <QDir>23#include <QDir>
24#include <QUrl>24#include <QUrl>
25#include <ucnamespace.h>
2526
26class tst_components_benchmark: public QObject27class tst_components_benchmark: public QObject
27{28{
@@ -32,7 +33,8 @@
32 QTest::addColumn<QString>("fileName");33 QTest::addColumn<QString>("fileName");
3334
34 QDir dir;35 QDir dir;
35 dir.setPath(UBUNTU_COMPONENT_PATH);36 dir.setPath(QString("%1/%2.%3").arg(UBUNTU_COMPONENT_PATH).arg(MAJOR_VERSION(LATEST_UITK_VERSION)).arg(MINOR_VERSION(LATEST_UITK_VERSION)));
37 QVERIFY2(dir.exists(), qPrintable(dir.absolutePath()));
36 QStringList nameFilters;38 QStringList nameFilters;
37 nameFilters << "*.qml";39 nameFilters << "*.qml";
38 dir.setNameFilters(nameFilters);40 dir.setNameFilters(nameFilters);
@@ -40,8 +42,7 @@
40 dir.setSorting(QDir::Size | QDir::Reversed);42 dir.setSorting(QDir::Size | QDir::Reversed);
4143
42 QFileInfoList list = dir.entryInfoList();44 QFileInfoList list = dir.entryInfoList();
4345 QVERIFY2(list.size(), qPrintable(dir.absolutePath()));
44 qDebug() << "Found" << list.size() << "tests.";
4546
46 for (int i = 0; i < list.size(); ++i) {47 for (int i = 0; i < list.size(); ++i) {
47 QFileInfo fileInfo = list.at(i);48 QFileInfo fileInfo = list.at(i);
@@ -52,8 +53,6 @@
52 void benchmark_creation_components() {53 void benchmark_creation_components() {
53 QFETCH(QString, fileName);54 QFETCH(QString, fileName);
5455
55 qDebug() << "Loading" << fileName;
56
57 QQmlComponent component(&engine, fileName);56 QQmlComponent component(&engine, fileName);
58 QObject *obj = component.create();57 QObject *obj = component.create();
59 obj->deleteLater();58 obj->deleteLater();
@@ -67,7 +66,8 @@
67 QTest::addColumn<QString>("fileName");66 QTest::addColumn<QString>("fileName");
6867
69 QDir dir;68 QDir dir;
70 dir.setPath(QString(UBUNTU_COMPONENT_PATH)+"/ListItems");69 dir.setPath(QString("%1/ListItems/%2.%3").arg(UBUNTU_COMPONENT_PATH).arg(MAJOR_VERSION(LATEST_UITK_VERSION)).arg(MINOR_VERSION(LATEST_UITK_VERSION)));
70 QVERIFY2(dir.exists(), qPrintable(dir.absolutePath()));
71 QStringList nameFilters;71 QStringList nameFilters;
72 nameFilters << "*.qml";72 nameFilters << "*.qml";
73 dir.setNameFilters(nameFilters);73 dir.setNameFilters(nameFilters);
@@ -75,8 +75,7 @@
75 dir.setSorting(QDir::Size | QDir::Reversed);75 dir.setSorting(QDir::Size | QDir::Reversed);
7676
77 QFileInfoList list = dir.entryInfoList();77 QFileInfoList list = dir.entryInfoList();
7878 QVERIFY2(list.size(), qPrintable(dir.absolutePath()));
79 qDebug() << "Found" << list.size() << "tests.";
8079
81 for (int i = 0; i < list.size(); ++i) {80 for (int i = 0; i < list.size(); ++i) {
82 QFileInfo fileInfo = list.at(i);81 QFileInfo fileInfo = list.at(i);
@@ -87,8 +86,6 @@
87 void benchmark_creation_listitems() {86 void benchmark_creation_listitems() {
88 QFETCH(QString, fileName);87 QFETCH(QString, fileName);
8988
90 qDebug() << "Loading" << fileName;
91
92 QQmlComponent component(&engine, fileName);89 QQmlComponent component(&engine, fileName);
93 QObject *obj = component.create();90 QObject *obj = component.create();
94 obj->deleteLater();91 obj->deleteLater();

Subscribers

People subscribed via source and target branches