Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
TestNeeded SQUASHathon page
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.
- Go to GitHub tickets for Rakudo or GitHub tickets for
roast. There are also some older tickets on RT
- Any ticket in those lists is practically a ticket for roast, so in most cases that's what you would be submitting a PR for. See roast/CONTRIBUTING.md.
- In some (relatively rare) cases the behavior should not be spec-ed in roast, but instead tests have to be added to rakudo. See
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).WHATused to produce
(Rat), then we can first use
committable6to 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
<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.