aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/ecmascripttests
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2017-11-23 11:34:27 +0100
committerErik Verbruggen <erik.verbruggen@qt.io>2017-12-14 09:24:03 +0000
commit6793683b165bca058e4bd9ee1b3beac8cff12b9d (patch)
treea3d4b875bd7a5f98d67cd5a870ceb7e756c9f63c /tests/auto/qml/ecmascripttests
parenta1fd2866465c4be2815a6ada776867b3d4efc557 (diff)
V4: Only start JITting after a minimum of 3 calls
Change-Id: I748e06041f3085980ce48391ba2d829a9d86a727 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/ecmascripttests')
-rw-r--r--tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp b/tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp
index 4303aec2a7..0d58d045b9 100644
--- a/tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp
+++ b/tests/auto/qml/ecmascripttests/tst_ecmascripttests.cpp
@@ -34,17 +34,28 @@
class tst_EcmaScriptTests : public QObject
{
Q_OBJECT
+
+ void runTests(bool interpret);
+
private slots:
- void runTests();
+ void runInterpreted();
+ void runJitted();
};
-void tst_EcmaScriptTests::runTests()
+void tst_EcmaScriptTests::runTests(bool interpret)
{
#if defined(Q_OS_LINUX) && defined(Q_PROCESSOR_X86_64)
+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+ if (interpret)
+ env.insert("QV4_FORCE_INTERPRETER", "1");
+ else
+ env.insert("QV4_JIT_CALL_THRESHOLD", "0");
+
QProcess process;
process.setProcessChannelMode(QProcess::ForwardedChannels);
process.setWorkingDirectory(QLatin1String(SRCDIR));
process.setProgram("python");
+ process.setProcessEnvironment(env);
process.setArguments(QStringList() << "test262.py" << "--command=" + QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs" << "--parallel" << "--with-test-expectations");
qDebug() << "Going to run" << process.program() << process.arguments() << "in" << process.workingDirectory();
@@ -60,6 +71,16 @@ void tst_EcmaScriptTests::runTests()
#endif
}
+void tst_EcmaScriptTests::runInterpreted()
+{
+ runTests(true);
+}
+
+void tst_EcmaScriptTests::runJitted()
+{
+ runTests(false);
+}
+
QTEST_GUILESS_MAIN(tst_EcmaScriptTests)
#include "tst_ecmascripttests.moc"