VirtualBox

Changeset 97328 in vbox


Ignore:
Timestamp:
Oct 27, 2022 5:55:11 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154325
Message:

changes for /cgi/status.py file, bugref:9778 comment 3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/cgi/status.py

    r96407 r97328  
    7474        test_box_os = line[3]
    7575        test_sched_group = line[4]
     76
     77        # idle testboxes might have an assigned testsets, skipping them
     78        if test_result not in g_kdTestStatuses:
     79            continue
     80
    7681        testboxes_dict = dict_update(testboxes_dict, testbox_name, test_result)
    7782
     
    290295            return False;
    291296
    292         #        oDb.execute('''
    293         #SELECT  TestBoxesWithStrings.sName,
    294         #        TestSets.enmStatus,
    295         #        CURRENT_TIMESTAMP - TestSets.tsCreated,
    296         #        TestBoxesWithStrings.sOS,
    297         #        SchedGroupNames.sSchedGroupNames
    298         #FROM    (SELECT TestBoxesInSchedGroups.idTestBox AS idTestBox,
    299         #                STRING_AGG(SchedGroups.sName, ',') AS sSchedGroupNames
    300         #         FROM   TestBoxesInSchedGroups
    301         #         INNER JOIN SchedGroups
    302         #                 ON SchedGroups.idSchedGroup = TestBoxesInSchedGroups.idSchedGroup
    303         #         WHERE  TestBoxesInSchedGroups.tsExpire = 'infinity'::TIMESTAMP
    304         #            AND SchedGroups.tsExpire            = 'infinity'::TIMESTAMP
    305         #         GROUP BY TestBoxesInSchedGroups.idTestBox)
    306         #        AS SchedGroupNames,
    307         #        TestBoxesWithStrings
    308         #LEFT OUTER JOIN TestSets
    309         #             ON TestSets.idTestBox = TestBoxesWithStrings.idTestBox
    310         #            AND (   TestSets.tsCreated > (CURRENT_TIMESTAMP - '%s hours'::interval)
    311         #                 OR TestSets.tsDone IS NULL)
    312         #WHERE   TestBoxesWithStrings.tsExpire = 'infinity'::TIMESTAMP
    313         #  AND   SchedGroupNames.idTestBox = TestBoxesWithStrings.idTestBox
    314         #''', (cHoursBack,));
     297        #
     298        # some comments regarding select below:
     299        # first part is about fetching all finished tests for last cHoursBack hours
     300        # second part is fetching all tests which isn't done
     301        # both old (running more than cHoursBack) and fresh (less than cHoursBack) ones
     302        # 'cause we want to know if there's a hanging tests together with currently running
     303        #
     304        # there's also testsets without status at all, likely because disabled testboxes still have an assigned testsets
     305        #
    315306        oDb.execute('''
    316307(   SELECT  TestBoxesWithStrings.sName,
     
    355346    LEFT OUTER JOIN TestSets
    356347                 ON TestSets.idTestBox  = TestBoxesWithStrings.idTestBox
    357                 AND TestSets.tsCreated < (CURRENT_TIMESTAMP - '%s hours'::interval)
    358348                AND TestSets.tsDone IS NULL
    359349    WHERE   TestBoxesWithStrings.tsExpire = 'infinity'::TIMESTAMP
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette