Sawyer X's March 5-25 2018 Perl 5 Porters Mailing list summary put out a call for macOS smoke testers. I thought I would see how far I could get putting one together from the Test-Smoke docs.
The following is not a blow-by-blow (painful and uninteresting to
read), but rather what I came up with after a few false starts,
with emphasis on what I did over and above the
documentation, and (sometimes) why.
- macOS 10.13 High Sierra
- Custom-built Perl installed system-wide in custom directory
- CPAN client (not cpanp or cpanm) configured to
- Install Test::Smoke. I chose a directory that was not
backed up by Time Machine. I used
~/Nobackup/perl/Test-Smoke-1.72/smoke. The default install is under
~/.cpan/, but I thought I wanted the smoker to be a little more visible. The
Test-Smoke-1.72/is because trial-and-error showed that the configuration script wants to put the Perl Git repository and build directories in siblings to
smoke/, and I wanted everything related to the smoker to be in a directory by itself. Note that there is nothing magic about the
Nobackup/directory name; it is not backed up because I configured Time Machine not to back it up.
- Because my CPAN client uses
sudoto install, the
smoke/directory and its contents were owned by
root, so I had to
sudo chown -Rback to myself.
- I wanted to smoke the current Perl. Trial and error showed
that the configuration script wanted to modify
perlcurrent.cfg. That file turned out to be read-only, and was found in
lib/Test/Smoke/. I copied it to
./, and did a
chmod u+won it.
perl configsmoke.pl. I chose to smoke
blead(the default), and took the default for all remaining questions. Note that we need to handle scheduling separately since macOS does not use
- Put contact information in
smokecurrent.usernote. I do not know if that is the intended use of this file, but I also did not see any other place to specify this, and I wanted people to be able to reach me if something screwed up.
time ./smokecurrent.sh, just to see if anything useful would happen, and if so what, and how long it would take. It took 5 hours, and somewhat to my surprise showed up as a "pass" at perl5.test-smoke.org/.
- MacOS has
consolidated a number of functions into a process called
launchd. The consolidated functionality includes
inetd. In order to get something scheduled by
launchdI wrote a
launchd.plist (5)file, which needs to be put in
~/Library/LaunchAgents/. I am still tweaking this, but the current version is here. Tweaks you may need or want are:
- Change the <Label> value to something you like. The name of the file should be this value, with ".plist" appended.
- Change the path to
smokecurrent.shto the appropriate value for your installation.
- The <WorkingDirectory> entry may be unneeded, because
the first thing
smokecurrent.shdoes is to
cdto the correct directory.
- Maybe the value of <ProcessType> should be
Background. I had it there once and got a FAIL(X), which I did not understand. I thought it might be a timing issue, so I decided to play it safe until I knew I had a working smoker.
launchctl load ~/Library/LaunchAgents/your-plist-file.plist
- In addition, you may want to go into the "Power" setting and tell your CPU not to go to sleep, at least during times your smoker is scheduled to run.