cts icon indicating copy to clipboard operation
cts copied to clipboard

Show some progress when running the CTS

Open greggman opened this issue 3 years ago • 4 comments

I'm not sure what's good/best/desired.

My goal is just to see some movement/animation.

As it is, I click "play" and often I have no clue if anything is happening.

greggman avatar Dec 23 '22 20:12 greggman

Yep +1, especially that the first thing you see "167 / 3084" which is counterintuitively not PASSED / TOTAL (useful info) but "TODO / TOTAL" (umm?).

vorg avatar May 06 '25 08:05 vorg

This was added a while ago as a first step

  • #2100

greggman avatar May 06 '25 16:05 greggman

I would like to report PASSED / TOTAL results. I just never bothered because the UI code would be a pain.

I want to keep the TODO / TOTAL info somewhere as it's useful for determining the completeness of the CTS... but I don't think anyone has really looked at those numbers in years.

kainino0x avatar May 07 '25 04:05 kainino0x

IIRC, one thing that makes not straight forward is there is no concrete tree of tests/cases/subcases. There are just closures

   [level1
     [sublevel2a
       [test3a
         [subcase4a]
         [subcase4b]
         [subcase4c]
       ]
     ]
   ]

From level1's POV there is just a function it calls "runtest". It has nothing to inspect to say it has 1 child test. Same for sublevel2a, and test3a, test3a doesn't know it has 3 subcases. It just has a function to call "runtest" it calls. So, there's no easy way to get a total

At least that's what I remember

I'm not even sure the closures know as it might not get the list of cases/subcases until that level of the test has run. Otherwise there would be an even longer startup time as it catalogs all the tests.

To put it another way. At init time the state is something like this

   [level1
     [sublevel2a
        ... unitialized ...
     ]
     [sublevel2b
        ... unitialized ...
     ]
   ]

If you start the test, at first it will be this

   [level1
     [sublevel2a
       [test3a
         [subcase4a]
         [subcase4b]
         [subcase4c]
       ]
     ]
     [sublevel2b
        ... unitialized ...
     ]
   ]

Until sublevel2a completes there is no data for sublevel2b. Lazy initialization is intentional but it means the tests doesn't know how many more tests there are at any given item.

At least that's my memory ... it might be bad 😅

greggman avatar May 07 '25 05:05 greggman