mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
New API.
This commit is contained in:
parent
f4508e7a80
commit
8ad8713a13
1 changed files with 7 additions and 8 deletions
|
@ -299,7 +299,9 @@ QString Test::extractPathFromTestsDown(const QString& fullPath) {
|
|||
|
||||
void Test::includeTest(QTextStream& textStream, const QString& testPathname) {
|
||||
QString partialPath = extractPathFromTestsDown(testPathname);
|
||||
textStream << "Script.include(repositoryPath + \"" << partialPath + "?raw=true\");" << endl;
|
||||
QString partialPathWithoutTests = partialPath.right(partialPath.length() - 7);
|
||||
|
||||
textStream << "Script.include(repositoryPath + \"" << partialPathWithoutTests + "\");" << endl;
|
||||
}
|
||||
|
||||
// Creates a single script in a user-selected folder.
|
||||
|
@ -394,20 +396,17 @@ void Test::createRecursiveScript(const QString& topLevelDirectory, bool interact
|
|||
const QString DATE_TIME_FORMAT("MMM d yyyy, h:mm");
|
||||
textStream << "// This is an automatically generated file, created by auto-tester on " << QDateTime::currentDateTime().toString(DATE_TIME_FORMAT) << endl << endl;
|
||||
|
||||
textStream << "user = \"" + GIT_HUB_USER + "/\";" << endl;
|
||||
textStream << "repository = \"" + GIT_HUB_REPOSITORY + "/\";" << endl << endl;
|
||||
// Include 'autoTest.js'
|
||||
textStream << "Script.include(\"https://raw.githubusercontent.com/highfidelity/hifi_tests/master/tests/utils/branchUtils.js\");" << endl;
|
||||
textStream << "var autoTester = createAutoTester(Script.resolvePath(\".\"));" << endl << endl;
|
||||
|
||||
textStream << "Script.include(\"https://github.com/highfidelity/hifi_tests/blob/RC69/tests/utils/branchUtils.js?raw=true\");" << endl;
|
||||
textStream << "branch = getBranch(Script.resolvePath(\".\"), repository) +\"/\";" << endl << endl;
|
||||
textStream << "var repositoryPath = autoTester.getRepositoryPath();" << endl << endl;
|
||||
|
||||
// Wait 10 seconds before starting
|
||||
textStream << "if (typeof Test !== 'undefined') {" << endl;
|
||||
textStream << " Test.wait(10000);" << endl;
|
||||
textStream << "};" << endl << endl;
|
||||
|
||||
textStream << "var repositoryPath = \"https://github.com/\" + user + repository + \"blob/\" + branch;" << endl;
|
||||
textStream << "var autoTester = Script.require(repositoryPath + \"tests/utils/autoTester.js?raw=true\");" << endl << endl;
|
||||
|
||||
textStream << "autoTester.enableRecursive();" << endl;
|
||||
textStream << "autoTester.enableAuto();" << endl << endl;
|
||||
|
||||
|
|
Loading…
Reference in a new issue