Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion dev/import-perl5/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ imports:
target: src/main/perl/lib/IO/Socket
type: directory

# IO::Select - OO interface to select() (required by TAP::Parser::Multiplexer)
- source: perl5/dist/IO/lib/IO/Select.pm
target: src/main/perl/lib/IO/Select.pm

# Phase 2: IO::Zlib - Compressed I/O (for Archive::Tar)
- source: perl5/cpan/IO-Zlib/Zlib.pm
target: src/main/perl/lib/IO/Zlib.pm
Expand Down Expand Up @@ -637,15 +641,33 @@ imports:
- source: perl5/lib/Class/Struct.pm
target: src/main/perl/lib/Class/Struct.pm

# From core distribution
# From core distribution - PerlOnJava has custom implementation
- source: perl5/dist/constant/lib/constant.pm
target: src/main/perl/lib/constant.pm
protected: true

# Tests for distribution
- source: perl5/dist/constant/t
target: perl5_t/constant
type: directory

# prove script - Test harness command-line tool (required by jprove wrapper)
- source: perl5/cpan/Test-Harness/bin/prove
target: src/main/perl/bin/prove

# App::Prove - prove application framework
- source: perl5/cpan/Test-Harness/lib/App/Prove.pm
target: src/main/perl/lib/App/Prove.pm

- source: perl5/cpan/Test-Harness/lib/App/Prove
target: src/main/perl/lib/App/Prove
type: directory

# Test-Harness tests
- source: perl5/cpan/Test-Harness/t
target: perl5_t/Test-Harness
type: directory

# Add more imports below as needed
# Example with minimal fields:
# - source: perl5/lib/SomeModule.pm
Expand Down
2 changes: 1 addition & 1 deletion docs/about/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Release history of PerlOnJava. See [Roadmap](roadmap.md) for future plans.
## v5.42.3: Unreleased - Next minor version

- Security: added `SECURITY.md` and CycloneDX SBOM generation (`make sbom`)
- Tools: added `jcpan` and `jperldoc`
- Tools: added `jcpan`, `jperldoc`, and `jprove`
- Perl debugger with `-d` command line option
- Add `defer` feature
- Non-local control flow: `last`/`next`/`redo`/`goto LABEL`
Expand Down
46 changes: 45 additions & 1 deletion docs/reference/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,51 @@ perl dev/tools/perl_test_runner.pl --jobs 4 --timeout 20 src/test/resources/unit
--jperl PATH Path to jperl executable (default: ./jperl)
```

### 2. JUnit/Gradle Testing (For CI/CD)
### 2. Using jprove (Standard Perl prove)

PerlOnJava includes `jprove`, a wrapper that runs the standard Perl `prove` test harness with jperl:

```bash
# Run tests in a directory
./jprove src/test/resources/unit

# Run with verbose output
./jprove -v t/*.t

# Run specific test files
./jprove t/basic.t t/advanced.t

# Run recursively
./jprove -r t/

# Run with parallel jobs
./jprove -j4 t/
```

**Common Options:**
```bash
-v, --verbose Print all test lines
-l, --lib Add 'lib' to @INC
-r, --recurse Recursively descend into directories
-j, --jobs N Run N test jobs in parallel
-q, --quiet Suppress some test output
--timer Print elapsed time after each test
--color Colored test output (default)
--nocolor Disable colored output
```

**Example Output:**
```
./jprove src/test/resources/unit/array.t
src/test/resources/unit/array.t .. ok
All tests successful.
Files=1, Tests=15, 1 wallclock secs
Result: PASS
```

`jprove` is useful when you want standard Perl `prove` behavior and options, while `perl_test_runner.pl` provides additional features like JSON reporting and feature impact analysis.

### 3. JUnit/Gradle Testing (For CI/CD)

Uses JUnit 5 with tags for test filtering:

Expand Down
7 changes: 7 additions & 0 deletions jprove
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
#
# jprove - Test Harness for PerlOnJava (Unix wrapper)
# Runs the standard prove script with jperl
#
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
exec "$SCRIPT_DIR/jperl" "$SCRIPT_DIR/src/main/perl/bin/prove" "$@"
2 changes: 1 addition & 1 deletion src/main/java/org/perlonjava/core/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public final class Configuration {
* Automatically populated by Gradle/Maven during build.
* DO NOT EDIT MANUALLY - this value is replaced at build time.
*/
public static final String gitCommitId = "9470032eb";
public static final String gitCommitId = "1d09334fe";

/**
* Git commit date of the build (ISO format: YYYY-MM-DD).
Expand Down
Loading
Loading