This way there's no need to rebuild the test every time. Script dir is symlinked from the source into the binary dir.
Showing the changes to tests/script-engine/src/ScriptEngineTests.cpp (1 of 5 files). Show all
Unified · Split
| @@ -76,10 +76,16 @@ void ScriptEngineTests::scriptTest() { · 75 unmodified lines | ||
| 76 | 76 | QVERIFY(!ac.isNull()); |
| 77 | 77 | |
| 78 | 78 | |
| 79 | − ac->loadOneScript("test1.js"); | |
| 80 | − //ac->loadOneScript("test-missing.js"); | |
| 81 | − //ac->loadOneScript("test-hello.js"); | |
| 82 | − //ac->loadOneScript("test-divide-by-zero.js"); | |
| 79 | + QDir testScriptsDir("tests"); | |
| 80 | + QStringList testScripts = testScriptsDir.entryList(QStringList() << "*.js", QDir::Files); | |
| 81 | + testScripts.sort(); | |
| 82 | + | |
| 83 | + for(QString script : testScripts) { | |
| 84 | + script = "tests/" + script; | |
| 85 | + qInfo() << "Running test script: " << script; | |
| 86 | + ac->loadOneScript(script); | |
| 87 | + } | |
| 88 | + | |
| 83 | 89 | qDebug() << ac->getRunning(); |
| 84 | 90 | |
| 85 | 91 | |