diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-03-13 18:58:12 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-14 22:40:24 +0100 |
commit | 42afaa992a24d8f423f24f279b5514cf914a3da0 (patch) | |
tree | 919a79f1abf2ffecb38ac7c75514a081023fc8d2 /tests/auto/other/d3dcompiler | |
parent | bcfc68f9cd00982decd7ceb312966caf6b1ca05e (diff) |
d3dcompiler_qt: Remove control file semantics
This simplifies the compiler control semantics by always using the
packaged compiler if it is available. With no packaged compiler, the
service is assumed to be running if the directory structure is present.
Use of a packaged library can be overridden by setting the environment
variable QT_D3DCOMPILER_DISABLE_DLL to 1.
When the runtime compiler is used, the source will no longer be
logged, and the compilation output will no longer be cached.
Change-Id: Ib07f517e7043d7785bdfa9da55abd34df518eeed
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'tests/auto/other/d3dcompiler')
-rw-r--r-- | tests/auto/other/d3dcompiler/tst_d3dcompiler.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/auto/other/d3dcompiler/tst_d3dcompiler.cpp b/tests/auto/other/d3dcompiler/tst_d3dcompiler.cpp index 1a34c2076b..750ea8fc4c 100644 --- a/tests/auto/other/d3dcompiler/tst_d3dcompiler.cpp +++ b/tests/auto/other/d3dcompiler/tst_d3dcompiler.cpp @@ -170,6 +170,7 @@ void tst_d3dcompiler::init() { qunsetenv("QT_D3DCOMPILER_DIR"); qunsetenv("QT_D3DCOMPILER_TIMEOUT"); + qunsetenv("QT_D3DCOMPILER_DISABLE_DLL"); } void tst_d3dcompiler::cleanup() @@ -195,8 +196,8 @@ void tst_d3dcompiler::service_data() // Don't test the default case, as it would clutter the AppData directory //QTest::newRow("default") << QByteArrayLiteral("") << true << E_ABORT; QTest::newRow("temporary") << QFile::encodeName(tempDir.path()) << true << E_ABORT; - QTest::newRow("invalid") << QByteArrayLiteral("ZZ:\\") << false << S_OK; - QTest::newRow("empty") << QByteArrayLiteral("") << false << S_OK; + QTest::newRow("invalid") << QByteArrayLiteral("ZZ:\\") << false << E_FAIL; + QTest::newRow("empty") << QByteArrayLiteral("") << false << E_FAIL; } void tst_d3dcompiler::service() @@ -205,16 +206,12 @@ void tst_d3dcompiler::service() QFETCH(bool, exists); QFETCH(HRESULT, result); qputenv("QT_D3DCOMPILER_DIR", compilerDir); + qputenv("QT_D3DCOMPILER_DISABLE_DLL", QByteArrayLiteral("1")); const QDir path = blobPath(); if (exists) { // Activate service QVERIFY(path.exists()); - - QFile control(path.absoluteFilePath(QStringLiteral("control"))); - QVERIFY(control.open(QFile::WriteOnly)); - control.close(); - QVERIFY(control.exists()); } else { QVERIFY(!path.exists()); } @@ -262,6 +259,7 @@ void tst_d3dcompiler::service() void tst_d3dcompiler::offlineCompile() { qputenv("QT_D3DCOMPILER_DIR", QFile::encodeName(tempDir.path())); + qputenv("QT_D3DCOMPILER_DISABLE_DLL", QByteArrayLiteral("1")); for (int i = 0; compilerDlls[i]; ++i) { d3dcompiler_win = loadLibrary(compilerDlls[i]); @@ -302,6 +300,8 @@ void tst_d3dcompiler::offlineCompile() void tst_d3dcompiler::onlineCompile() { qputenv("QT_D3DCOMPILER_DIR", QFile::encodeName(tempDir.path())); + qputenv("QT_D3DCOMPILER_TIMEOUT", QByteArray::number(3000)); + qputenv("QT_D3DCOMPILER_DISABLE_DLL", QByteArrayLiteral("1")); QByteArray data(hlsl); @@ -309,10 +309,6 @@ void tst_d3dcompiler::onlineCompile() // Activate service QVERIFY(path.exists()); - QFile control(path.absoluteFilePath(QStringLiteral("control"))); - QVERIFY(control.open(QFile::WriteOnly)); - control.close(); - QVERIFY(control.exists()); d3dcompiler_qt = loadLibrary(D3DCOMPILER_DLL); QVERIFY(d3dcompiler_qt); |