hythm7 / Pakku

Package Manager for the Raku Programming Language
Artistic License 2.0
26 stars 3 forks source link

Pakku issuing False Failure during TST #35

Closed Xliff closed 1 year ago

Xliff commented 1 year ago

Hello,

I just started trying Pakku and I love it. I think it will finally allow me to start releasing this back log of code I have.

Unfortunately, it's issuing a failure during the TST phase that I can't find during the real execution.

Here is the output from the test:

1..59
ok 1 - Structure sizes for GArray match
ok 2 - Structure sizes for GByteArray match
ok 3 - Structure sizes for GCClosure match
ok 4 - Structure sizes for GClosure match
ok 5 - Structure sizes for GCond match
ok 6 - Structure sizes for GDate match
ok 7 - Structure sizes for GDebugKey match
ok 8 - Structure sizes for GError match
ok 9 - Structure sizes for GHashTableIter match
ok 10 - Structure sizes for GHookList match
ok 11 - Structure sizes for GInterfaceInfo match
ok 12 - Structure sizes for GList match
ok 13 - Structure sizes for GLogField match
ok 14 - Structure 'GLogField-Str' is not to be tested
ok 15 - Structure sizes for GNode match
ok 16 - Structure sizes for GOnce match
ok 17 - Structure sizes for GOptionEntry match
ok 18 - Structure sizes for GParamSpec match
ok 19 - Structure sizes for GParamSpecBoolean match
ok 20 - Structure sizes for GParamSpecChar match
ok 21 - Structure sizes for GParamSpecDouble match
ok 22 - Structure sizes for GParamSpecEnum match
ok 23 - Structure sizes for GParamSpecFlags match
ok 24 - Structure sizes for GParamSpecFloat match
ok 25 - Structure sizes for GParamSpecInt match
ok 26 - Structure sizes for GParamSpecInt64 match
ok 27 - Structure sizes for GParamSpecLong match
ok 28 - Structure sizes for GParamSpecTypeInfo match
ok 29 - Structure sizes for GParamSpecUChar match
ok 30 - Structure sizes for GParamSpecUInt match
ok 31 - Structure sizes for GParamSpecUInt64 match
ok 32 - Structure sizes for GParamSpecULong match
ok 33 - Structure sizes for GParamSpecUnichar match
ok 34 - Structure sizes for GParamSpecValueArray match
ok 35 - Structure sizes for GParameter match
ok 36 - Structure 'GPollFD' is not to be tested
ok 37 - Structure 'GPollFDNonWin' is not to be tested
ok 38 - Structure 'GPollFDWin' is not to be tested
ok 39 - Structure sizes for GPtrArray match
ok 40 - Structure sizes for GQueue match
ok 41 - Structure sizes for GRecMutex match
ok 42 - Structure sizes for GSList match
ok 43 - Structure sizes for GSignalInvocationHint match
ok 44 - Structure sizes for GSignalQuery match
ok 45 - Structure sizes for GSourceCallbackFuncs match
ok 46 - Structure sizes for GSourceFuncs match
ok 47 - Structure sizes for GString match
ok 48 - Structure sizes for GTestConfig match
ok 49 - Structure sizes for GTestLogBuffer match
ok 50 - Structure sizes for GTestLogMsg match
ok 51 - Structure sizes for GTimeVal match
ok 52 - Structure sizes for GTypeFundamentalInfo match
ok 53 - Structure sizes for GTypeInfo match
ok 54 - Structure sizes for GTypeInterface match
ok 55 - Structure sizes for GTypeQuery match
ok 56 - Structure sizes for GTypeValueTable match
ok 57 - Structure sizes for GUriParamsIter match
ok 58 - Structure sizes for GValue match
ok 59 - Structure sizes for GValueArray match
ok 60 - Structure sizes for GVariant match
ok 61 - Structure sizes for GVariantIter match
ok 62 - Structure 'GVariantSerialized' is not to be tested (internal struct)
ok 63 - Structure 'GVariantTree' is not to be tested (internal struct)
ok 64 - Structure sizes for GVariantTypeInfo match
ok 65 - Structure sizes for GWeakRef match
# You planned 59 tests, but ran 65

As you can see there are no actual failures, but Pakku might be interpreting the run of the test as a failure due to non-critical errors.

If you can fix this soon, I'd appreciate it. However, I might take a stab at it in breaks from $dayJob. Just thought I't pass the possibility along.

hythm7 commented 1 year ago

Hello,

Can you copy/paste the Pakku command you ran and/or the actuall error you seeing when run it so I can investigate the error?

Thanks

hythm7 commented 1 year ago

# You planned 59 tests, but ran 65 may be this is the issue?

The test output showing planned 65, If you have plan 59 in the test file can you change it to plan 65 and see if the test succeeds?

Xliff commented 1 year ago

Changing the number of tests to match fixed the issue. Seeing that this is a self authored issue, I must accept the mea culpa on this one. However it does pose the question: do you think this situation is an actual failure and worth the extra code to check?

Also, I am running a terminal where the bar graph implementation is not working. Should I file a separate issue and what particular information will you need?

hythm7 commented 1 year ago

Changing the number of tests to match fixed the issue. Seeing that this is a self authored issue, I must accept the mea culpa on this one. However it does pose the question: do you think this situation is an actual failure and worth the extra code to check?

This behavior actually comes from Raku's Test module, it returns error exit code if the number of tests ran mismatch the planned tests.

if you run the test file using Raku eg. raku -I. t/01-basic.rakutest and check the exit code right after with echo $? you should get 0 when tests matches plan, and error code when tests don't match plan. so when Pakku checks the exit code and fnd it non zero it issues a test failure.

I do think this behavior is correct, If I don't know how many tests I need I just comment out the plan #.

hythm7 commented 1 year ago

Also, I am running a terminal where the bar graph implementation is not working. Should I file a separate issue and what particular information will you need?

Could you create a separate issue for this? may be add the terminal type and if there is a screenshot of the issue would be helpfull as well.

Also there is a warning message in the README at the end of this section regarding terminals that don't support ASCII escape codes, may be it will be helpfull.

hythm7 commented 1 year ago

Also, I am running a terminal where the bar graph implementation is not working. Should I file a separate issue and what particular information will you need?

Just pushed a release with a fix for bar graph implementation on xterm terminal, Let me know if that fixes the issue you saw in your terminal. Thanks.

Xliff commented 1 year ago

Yep! Looks great! Can confirm it works on xterm in the following:

Distributor ID: Ubuntu
Description:    Ubuntu Mantic Minotaur (development branch)
Release:        23.10
Codename:       mantic
hythm7 commented 1 year ago

Thanks for confirming!