PetaPerl Testing
PetaPerl uses conformance testing: each .t file runs under both perl5 and pperl, and passes when output matches exactly.
Quick Reference
# Run specific tests
t/TEST 05-op # Tests matching "05-op"
t/TEST 25-regex/010-basic.t # Single test file
t/TEST -v 05-op # Verbose (show diffs)
# Check results without re-running
grep "FAIL" t/.results/LATEST.txt
# Full regression check (coordinate with team)
t/TEST --skip=bytecode,tier,debug
Detailed Documentation
- Running Tests — Harness usage, options, result tracking
- Writing Tests — TAP format, conventions, per-test configuration
- Test Structure — Directory layout, naming, category descriptions
- Failure Assessment — Interpreting failures, regression detection, triage
- Perl5 Comparison — Conformance methodology, edge cases
- Upstream Test Mapping — Porting from perl5-upstream, re_tests status
Test Format
Tests use raw TAP (Test Anything Protocol). No test framework, no shared library:
#!/usr/bin/perl
# Description of what this tests
print "1..3\n";
my $t = 1;
sub ok { my ($c,$n) = @_; print $c ? "ok $t - $n\n" : "not ok $t - $n\n"; $t++; }
ok(1 + 1 == 2, "addition");
ok("a" eq "a", "string eq");
ok(defined 0, "zero is defined");
Concurrency Warning
Multiple developers may share this machine. Run only targeted tests during development. Full-suite runs should be coordinated.