TestNeeded SQUASHathon page

Aleks-Daniel Jakimenko-Aleksejev edited this page Jan 3, 2019 · 8 revisions

The intention of this class of SQUASHathons is to write tests for Perl 6 (roast) and for the Rakudo compiler (in the Rakudo repo). Continuing development has created a small pile of tickets, and any help reducing it will be much appreciated.

There are many different ways you can help. This page discusses some of them in detail.

Consider joining #perl6-dev and talking to humans. Chances are it will be much easier for you to join the channel and ask for guidance rather than read all the details that this page provides.

Resolving testneeded tickets






Using Whateverables

This section is about testing behavior on different rakudo revisions. This is not strictly required, but it may help you figure out what is going on and make sure your contributed tests are actually doing what you intend them to do.

We will take an existing ticket as an example.

  • If the ticket says that say (10 ** -1).WHAT used to produce (Num) instead of (Rat), then we can first use committable6 to get a bigger picture:

<AlexDaniel> committable6: releases say (10 ** -1).WHAT
<committable6> AlexDaniel, ¦releases (23 commits): «(Rat)»

What happened? Most whateverables use 2015.12 as a starting point, so anything older than that will require you to be a bit more specific (it will also take a few more seconds, so be patient):

<AlexDaniel> committable6: all say (10 ** -1).WHAT
<committable6> AlexDaniel, https://gist.github.com/48f7b9488960ff04088d20d710626c5d

  • According to the output from committable6, we know that the relevant change happened somewhere between 2015.04 and 2015.05. Now we can easily bisect it:

<AlexDaniel> bisectable6: old=2015.04 new=2015.05 say (10 ** -1).WHAT
<bisectable6> AlexDaniel, Bisecting by output (old=2015.04 new=2015.05) because on both starting points the exit code is 0
<bisectable6> AlexDaniel, bisect log: https://gist.github.com/d0b3f970a3b8c6f2499705c197f5ae07
<bisectable6> AlexDaniel, (2015-05-18) https://github.com/rakudo/rakudo/commit/563abdd46845d70483a21180c817de516003309c

  • If we have some doubts on whether that result is what we need, we can double check. You can append ^ to a git sha and it will give you the parent of that commit. So we want to check the output on 563abdd4684^ and 563abdd4684.

<AlexDaniel> committable6: 563abdd4684^,563abdd4684 say (10 ** -1).WHAT
<committable6> AlexDaniel, ¦563abdd4684^: «(Num)» ¦563abdd: «(Rat)»

This confirms the result from bisectable.

  • Sometimes the commit message will mention the ticket number. If so, then we can go to that ticket and see if there are tests for it already and if these tests cover the ticket that we were reviewing. In this particular case we are out of luck, so we just have to leave a comment saying that the fix was bisected to 563abdd4684.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.