mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
add ci_test.bat file for windows testing (#7557)
this relies on jruby being installed locally with the same version as the one contained in the .ruby-version file at the root of the project The jruby must be installed in %JRUBYSRCDIR%\%JRUBYVERSION%
This commit is contained in:
parent
c32db3b2f8
commit
a797bf3721
1 changed files with 41 additions and 0 deletions
41
ci/ci_test.bat
Normal file
41
ci/ci_test.bat
Normal file
|
@ -0,0 +1,41 @@
|
|||
@echo off
|
||||
|
||||
setlocal
|
||||
|
||||
REM Since we are using the system jruby, we need to make sure our jvm process
|
||||
REM uses at least 1g of memory, If we don't do this we can get OOM issues when
|
||||
REM installing gems. See https://github.com/elastic/logstash/issues/5179
|
||||
|
||||
SET JRUBY_OPTS="-J-Xmx1g"
|
||||
SET SELECTEDTESTSUITE=%1
|
||||
SET /p JRUBYVERSION=<.ruby-version
|
||||
|
||||
IF NOT EXIST %JRUBYSRCDIR% (
|
||||
echo "Variable JRUBYSRCDIR must be declared with a valid directory. Aborting.."
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
SET JRUBYPATH=%JRUBYSRCDIR%\%JRUBYVERSION%
|
||||
|
||||
IF NOT EXIST %JRUBYPATH% (
|
||||
echo "Could not find JRuby in %JRUBYPATH%. Aborting.."
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
SET RAKEPATH=%JRUBYPATH%\bin\rake
|
||||
|
||||
IF "%SELECTEDTESTSUITE%"=="core-fail-fast" (
|
||||
echo "Running core-fail-fast tests"
|
||||
%RAKEPATH% test:install-core
|
||||
%RAKEPATH% test:core-fail-fast
|
||||
) ELSE (
|
||||
IF "%SELECTEDTESTSUITE%"=="all" (
|
||||
echo "Running all plugins tests"
|
||||
%RAKEPATH% test:install-all
|
||||
%RAKEPATH% test:plugins
|
||||
) ELSE (
|
||||
echo "Running core tests"
|
||||
%RAKEPATH% test:install-core
|
||||
%RAKEPATH% test:core
|
||||
)
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue