From 1a079c62cb46e3fc926af7f57de5732c668f6908 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 7 Jan 2011 16:08:01 +0000 Subject: [PATCH] minor update (generic tests now have bigger priority in test queue than parsed DBMS related ones) --- lib/core/common.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 0f89d5ffe..d2e89be1c 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1936,10 +1936,17 @@ def getInjectionTests(): retVal = conf.tests + def priorityFunction(test): + retVal = 0 + if 'details' in test and 'dbms' in test.details: + if test.details.dbms in getErrorParsedDBMSes(): + retVal = 1 + else: + retVal = 2 + return retVal + if getErrorParsedDBMSes(): - retVal = sorted(retVal, key=lambda test: False \ - if 'details' in test and 'dbms' in test.details \ - and test.details.dbms in getErrorParsedDBMSes() else True) + retVal = sorted(retVal, key=priorityFunction) return retVal