-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjcpan.bat
More file actions
32 lines (30 loc) · 1.03 KB
/
jcpan.bat
File metadata and controls
32 lines (30 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@echo off
rem jcpan - CPAN Client for PerlOnJava (Windows wrapper)
rem Runs the standard cpan script with jperl
rem Supports --jobs N for parallel test execution:
rem jcpan --jobs 4 -t Module::Name
set SCRIPT_DIR=%~dp0
rem Parse --jobs option for parallel test jobs
set "JCPAN_ARGS="
:parse_args
if "%~1"=="" goto run
if "%~1"=="--jobs" (
set "HARNESS_OPTIONS=j%~2"
shift
shift
goto parse_args
)
set "JCPAN_ARGS=%JCPAN_ARGS% %1"
shift
goto parse_args
:run
rem Set default per-test timeout (300s) to kill hanging tests
if not defined JPERL_TEST_TIMEOUT set "JPERL_TEST_TIMEOUT=300"
rem Expose jperl and jcpan launchers, and prepend SCRIPT_DIR to PATH so
rem shell-spawned subprocesses (distroprefs commandlines, prove --exec,
rem etc.) can find jperl/jcpan without tokens that don't expand in
rem POSIX sh. See src/main/perl/lib/CPAN/Config.pm (Moose.yml).
set "JPERL_BIN=%SCRIPT_DIR%jperl.bat"
set "JCPAN_BIN=%SCRIPT_DIR%jcpan.bat"
set "PATH=%SCRIPT_DIR%;%PATH%"
"%SCRIPT_DIR%jperl.bat" "%SCRIPT_DIR%src\main\perl\bin\cpan" %JCPAN_ARGS%