Try with TZInfo and Timezone gems
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ab73b30539
commit
2d0833e101
@ -76,6 +76,8 @@ env:
|
|||||||
# JOBS and SETARCH are overridden when necessary; see below.
|
# JOBS and SETARCH are overridden when necessary; see below.
|
||||||
- JOBS=-j$((1+${NPROC}))
|
- JOBS=-j$((1+${NPROC}))
|
||||||
- SETARCH=
|
- SETARCH=
|
||||||
|
- RUBY_PREFIX=/tmp/ruby-prefix
|
||||||
|
- GEMS_FOR_TEST='timezone tzinfo'
|
||||||
|
|
||||||
.org.ruby-lang.ci.matrix-definitions:
|
.org.ruby-lang.ci.matrix-definitions:
|
||||||
|
|
||||||
@ -343,7 +345,7 @@ before_script:
|
|||||||
[ ! -f config.cache ] ||
|
[ ! -f config.cache ] ||
|
||||||
[ "$CC" = "`sed -n s/^ac_cv_prog_CC=//p config.cache`" ] ||
|
[ "$CC" = "`sed -n s/^ac_cv_prog_CC=//p config.cache`" ] ||
|
||||||
(set -x; exec rm config.cache)
|
(set -x; exec rm config.cache)
|
||||||
- $SETARCH ../configure -C --disable-install-doc --prefix=/tmp/ruby-prefix $CONFIG_FLAG
|
- $SETARCH ../configure -C --disable-install-doc --prefix=$RUBY_PREFIX $CONFIG_FLAG
|
||||||
- cp -pr config.cache config.status .ext/include ../config_1st
|
- cp -pr config.cache config.status .ext/include ../config_1st
|
||||||
- $SETARCH make reconfig
|
- $SETARCH make reconfig
|
||||||
- cp -pr config.cache config.status .ext/include ../config_2nd
|
- cp -pr config.cache config.status .ext/include ../config_2nd
|
||||||
@ -354,6 +356,7 @@ before_script:
|
|||||||
- chmod u-w ..
|
- chmod u-w ..
|
||||||
- $SETARCH make -s $JOBS && make install
|
- $SETARCH make -s $JOBS && make install
|
||||||
- ccache --show-stats
|
- ccache --show-stats
|
||||||
|
- [ -z "${GEMS_FOR_TEST}" ] || $RUBY_PREFIX/bin/gem install --no-document $GEMS_FOR_TEST
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- $SETARCH make -s test TESTOPTS="${TESTOPTS=$JOBS -q --tty=no}"
|
- $SETARCH make -s test TESTOPTS="${TESTOPTS=$JOBS -q --tty=no}"
|
||||||
|
@ -16,6 +16,7 @@ environment:
|
|||||||
- build: vs
|
- build: vs
|
||||||
vs: 140
|
vs: 140
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
|
GEMS_FOR_TEST: "timezone tzinfo"
|
||||||
notifications:
|
notifications:
|
||||||
- provider: Webhook
|
- provider: Webhook
|
||||||
url:
|
url:
|
||||||
@ -89,6 +90,7 @@ for:
|
|||||||
- nmake -l
|
- nmake -l
|
||||||
- nmake install-nodoc
|
- nmake install-nodoc
|
||||||
- \usr\bin\ruby -v -e "p :locale => Encoding.find('locale'), :filesystem => Encoding.find('filesystem')"
|
- \usr\bin\ruby -v -e "p :locale => Encoding.find('locale'), :filesystem => Encoding.find('filesystem')"
|
||||||
|
- if not "%GEMS_FOR_TEST%" == "" \usr\bin\gem install --no-document %GEMS_FOR_TEST%
|
||||||
test_script:
|
test_script:
|
||||||
- set /a JOBS=%NUMBER_OF_PROCESSORS%
|
- set /a JOBS=%NUMBER_OF_PROCESSORS%
|
||||||
- nmake -l "TESTOPTS=-v -q" btest
|
- nmake -l "TESTOPTS=-v -q" btest
|
||||||
@ -134,6 +136,7 @@ for:
|
|||||||
- mingw32-make -j%JOBS% up
|
- mingw32-make -j%JOBS% up
|
||||||
- mingw32-make -j%JOBS%
|
- mingw32-make -j%JOBS%
|
||||||
- mingw32-make DESTDIR=../install install-nodoc
|
- mingw32-make DESTDIR=../install install-nodoc
|
||||||
|
- if not "%GEMS_FOR_TEST%" == "" ..\install\bin\gem install --no-document %GEMS_FOR_TEST%
|
||||||
test_script:
|
test_script:
|
||||||
- mingw32-make test
|
- mingw32-make test
|
||||||
- mingw32-make test-all TESTOPTS="--retry --job-status=normal --show-skip --subprocess-timeout-scale=1.5 --excludes=../ruby/test/excludes/_appveyor -j %JOBS% --exclude win32ole --exclude test_open-uri"
|
- mingw32-make test-all TESTOPTS="--retry --job-status=normal --show-skip --subprocess-timeout-scale=1.5 --excludes=../ruby/test/excludes/_appveyor -j %JOBS% --exclude win32ole --exclude test_open-uri"
|
||||||
|
@ -603,3 +603,41 @@ class TestTimeTZ::DummyTZ < Test::Unit::TestCase
|
|||||||
TestTimeTZ::TZ.new(tzname, abbr, utc_offset)
|
TestTimeTZ::TZ.new(tzname, abbr, utc_offset)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
require "tzinfo"
|
||||||
|
rescue LoadError
|
||||||
|
else
|
||||||
|
class TestTimeTZ::GemTZInfo < Test::Unit::TestCase
|
||||||
|
include TestTimeTZ::WithTZ
|
||||||
|
|
||||||
|
class TIME_CLASS < ::Time
|
||||||
|
def self.find_timezone(tzname)
|
||||||
|
TZInfo::Timezone.get(tzname)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def tz
|
||||||
|
@tz ||= TZInfo::Timezone.get(tzname)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
require "timezone"
|
||||||
|
rescue LoadError
|
||||||
|
else
|
||||||
|
class TestTimeTZ::GemTimezone < Test::Unit::TestCase
|
||||||
|
include TestTimeTZ::WithTZ
|
||||||
|
|
||||||
|
class TIME_CLASS < ::Time
|
||||||
|
def self.find_timezone(name)
|
||||||
|
Timezone[name]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def tz
|
||||||
|
@tz ||= Timezone[tzname]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user