File: appveyor-test.bat

package info (click to toggle)
libcpanel-json-xs-perl 4.09-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,776 kB
  • sloc: perl: 1,052; makefile: 8
file content (41 lines) | stat: -rw-r--r-- 1,374 bytes parent folder | download | duplicates (7)
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
33
34
35
36
37
38
39
40
41
@echo off

rem Test::MinimumVersion JSON
set REQS=Pod::Text Time::Piece common::sense Mojo::JSON Test::LeakTrace Test::CPAN::Meta Test::Pod Test::Pod::Coverage
set PERL_MM_USE_DEFAULT=1

if not "%PLATFORM%" == "x64" set WIN64=undef
if "%STRAWBERRY%" == "1" goto gcc
if "%MSVC_CPERL%" == "1" goto msvc

:gcc

set PATH=C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH%
echo cpan -T %REQS%
call cpan -T %REQS% || exit /b 1
echo perl Makefile.PL
perl Makefile.PL || exit /b 1
rem strawberry switched with 5.26 from dmake to gmake
echo $Config{make}
perl -MConfig -e "system({$Config{make}} $Config{make}); exit(($? < 0 || $? & 127) ? 1 : ($? >> 8));" || exit /b 1
echo $Config{make} test
perl -MConfig -e "system({$Config{make}} $Config{make}, 'test'); exit(($? < 0 || $? & 127) ? 1 : ($? >> 8));" || exit /b 1

exit /b

:msvc
if "%PLATFORM%" == "x64" set PLATFORM=amd64
rem 14 deviates from cperl with linker errors for the libc runtime
set MSVC_VERSION=12
call "C:\Program Files (x86)\Microsoft Visual Studio %MSVC_VERSION%.0\VC\vcvarsall.bat" %PLATFORM% || exit /b 1

set PATH=C:\cperl\bin;C:\cperl\site\bin;%PATH%
echo cperl -S cpan -T %REQS%
cperl -S cpan -T %REQS% || exit /b 1
echo cperl Makefile.PL
cperl Makefile.PL || exit /b 1
echo nmake
nmake || exit /b 1
echo nmake test
nmake test || exit /b 1