aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2019-04-16 11:33:40 +0300
committerMartin Storsjö <martin@martin.st>2019-04-16 11:52:11 +0000
commit0f3e0877d5709cefa119ae64fbe6b4ca0e963543 (patch)
tree337e903e387036d2450c4f0df1e9a2c74971010d /tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
parent398d586a59e768f6e442fdc912d9180df71ff374 (diff)
Test whether the JIT is enabled on architectures/OSes as intended
Change-Id: Ifdba6f08545e07b04cc7d9ace48ad0599c41229c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qv4assembler/tst_qv4assembler.cpp')
-rw-r--r--tests/auto/qml/qv4assembler/tst_qv4assembler.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp b/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
index 9bd1afa256..afc00ec72c 100644
--- a/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
+++ b/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
@@ -29,6 +29,7 @@
#include <QtTest/QtTest>
#include <QtCore/qprocess.h>
#include <QtCore/qtemporaryfile.h>
+#include <private/qv4global_p.h>
class tst_QV4Assembler : public QObject
{
@@ -36,6 +37,7 @@ class tst_QV4Assembler : public QObject
private slots:
void perfMapFile();
+ void jitEnabled();
};
void tst_QV4Assembler::perfMapFile()
@@ -85,6 +87,26 @@ void tst_QV4Assembler::perfMapFile()
#endif
}
+#ifdef V4_ENABLE_JIT
+#define JIT_ENABLED 1
+#else
+#define JIT_ENABLED 0
+#endif
+
+void tst_QV4Assembler::jitEnabled()
+{
+#if defined(Q_OS_IOS) || defined(Q_OS_TVOS)
+ /* JIT should be disabled on iOS and tvOS. */
+ QCOMPARE(JIT_ENABLED, 0);
+#elif defined(Q_OS_WIN) && defined(Q_PROCESSOR_ARM)
+ /* JIT should be disabled Windows on ARM/ARM64 for now. */
+ QCOMPARE(JIT_ENABLED, 0);
+#else
+ /* JIT should be enabled on all other architectures/OSes tested in CI. */
+ QCOMPARE(JIT_ENABLED, 1);
+#endif
+}
+
QTEST_MAIN(tst_QV4Assembler)
#include "tst_qv4assembler.moc"