4.3.0.0: silly upload summaries

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

4.3.0.0: silly upload summaries

Post by filbo »

During tape uploading:

Code: Select all

===============================================================================
Number of levels played: 0
Number of levels solved: 0 (0%)
-------------------------------------------------------------------------------
Summary (for automatic parsing by scripts):
LEVELDIR [WARN] 'l_evel_set', SOLVED 0/0 (0%)
===============================================================================
-- which isn't strictly wrong -- no levels were in fact played or solved; but it's a silly summary! Should be more like:

Code: Select all

===============================================================================
Levelset name:                l_evel_set
Number of levels in levelset: 80
Number of levels with tapes:  70
-------------------------------------------------------------------------------
Summary (for automatic parsing by scripts):
LEVELDIR [WARN] 'l_evel_set', UPLOADED 70/80 (87.5%)
===============================================================================
(oh, BTW, I just noticed that in actual autoplay runs, levelsets which are completely solved say '[ OK ]' in the 'parseable' output. I usually script this sort of stuff in terms of space-separated fields, so ' [OK] ' would be much better, while also retaining the column boundaries for anyone scripting in those terms...)
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: 4.3.0.0: silly upload summaries

Post by Holger »

Yes, upload summaries should probably improved. (OIn the other hand, almost nobody probably uses the command line to upload tapes, and after initially uploading tapes, there should be no need anymore to manually upload tapes on the command line anyway. But nevertheless, I agree here.)
(oh, BTW, I just noticed that in actual autoplay runs, levelsets which are completely solved say '[ OK ]' in the 'parseable' output. I usually script this sort of stuff in terms of space-separated fields, so ' [OK] ' would be much better, while also retaining the column boundaries for anyone scripting in those terms...)
That's because I create summaries from my automated tape tests by grepping for "LEVELDIR" (which better should be "LEVELSET"), which look like this:

Code: Select all

...
LEVELDIR [ OK ] 'rnd_benoit_karriere_ii', SOLVED 8/8 (100%)
LEVELDIR [ OK ] 'rnd_bojster', SOLVED 7/7 (100%)
LEVELDIR [ OK ] 'rnd_eden_corbin', SOLVED 31/31 (100%)
LEVELDIR [WARN] 'rnd_falk_sobe', SOLVED 34/47 (72%), FAILED: 001 004 015 017 019 021 024 027 039 042 048 050 051
LEVELDIR [WARN] 'rnd_martijn_mooij', SOLVED 14/15 (93%), FAILED: 002
LEVELDIR [ OK ] 'rnd_niko_boehm', SOLVED 25/25 (100%)
LEVELDIR [WARN] 'rnd_norbert_de_jonge', SOLVED 1/2 (50%), FAILED: 001
LEVELDIR [WARN] 'rnd_philip_winter', SOLVED 15/20 (75%), FAILED: 005 011 017 018 019
LEVELDIR [ OK ] 'rnd_rado_negundo', SOLVED 50/50 (100%)
LEVELDIR [WARN] 'rnd_rado_negundo_v', SOLVED 30/31 (96%), FAILED: 029
LEVELDIR [WARN] 'rnd_remco_mooij', SOLVED 13/18 (72%), FAILED: 002 004 008 016 017
LEVELDIR [ OK ] 'rnd_xinyu_sun_and_xiangdong_wen', SOLVED 4/4 (100%)
LEVELDIR [ OK ] 'rnd_martijn_mooij_ii', SOLVED 32/32 (100%)
LEVELDIR [ OK ] 'rnd_martijn_mooij_iii', SOLVED 35/35 (100%)
...
That's why I use "[ OK ]" instead of "[OK]". Maybe I could use "[=OK=]" instead...
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: 4.3.0.0: silly upload summaries

Post by filbo »

'[GOOD]' maybe? Except that could break some existing script somewhere... e.g. my own test-tapes.sh :)

But if my thing breaks, I just fix it...
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: 4.3.0.0: silly upload summaries

Post by Holger »

That would work, yes. However, I do like seeing at a glance which sets are OK and which are not, which would be visually harder with "[GOOD]" instead of "[ OK ]" if you have hundreds of results.

If you are parsing result fields by spaces, just pipe them through an additional sed "s/\[ OK \]/[OK]/" before separating by spaces. :)
Post Reply