From ea8bec30a74fb7d7480f1555722eec3a76aa48dc Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 9 Oct 2018 17:11:25 -0700 Subject: [PATCH] Update TestRail with results has been updated. --- tools/auto-tester/src/TestRailInterface.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/auto-tester/src/TestRailInterface.cpp b/tools/auto-tester/src/TestRailInterface.cpp index 11bc5db4a4..f943935539 100644 --- a/tools/auto-tester/src/TestRailInterface.cpp +++ b/tools/auto-tester/src/TestRailInterface.cpp @@ -512,6 +512,8 @@ void TestRailInterface::updateRunWithResults() { // The failed tests are read, formatted and inserted into a set // A failure named 'Failure_1--tests.content.entity.material.apply.avatars.00000' is formatted to 'content/entity/material/apply/avatars' // This is the name of the test in TestRail + // + // A success is named `Success_-tests. ... stream << "from os import listdir\n"; stream << "failed_tests = set()\n"; @@ -519,6 +521,11 @@ void TestRailInterface::updateRunWithResults() { QDir dir(_outputDirectory + "/" + TEMP_NAME); if (dir.exists()) { stream << "for entry in listdir('" + _outputDirectory + "/" + TEMP_NAME + "'):\n"; + + // skip over successes + stream << "\tif entry.split('_')[0] == 'Success':\n"; + stream << "\t\tcontinue\n"; + stream << "\tparts = entry.split('--tests.')[1].split('.')\n"; stream << "\tfailed_test = parts[0]\n"; stream << "\tfor i in range(1, len(parts) - 1):\n";