summaryrefslogtreecommitdiff
path: root/.azure-pipelines
diff options
context:
space:
mode:
authorColby Swandale <me@colby.fyi>2019-03-04 10:09:52 +1100
committerColby Swandale <me@colby.fyi>2019-03-04 10:35:13 +1100
commit24aadde60853530248a8dd0439e8776d54d4a92f (patch)
tree5238e4bb9388defa50ac2f78f2c32a80be577f42 /.azure-pipelines
parent493b4438db43acd1f90228406fa6e6fda96009c8 (diff)
downloadbundler-24aadde60853530248a8dd0439e8776d54d4a92f.tar.gz
move azure-pipeline folder to a hidden foldercolby/azure-pipeline-hidden
Diffstat (limited to '.azure-pipelines')
-rw-r--r--.azure-pipelines/rbreadline.diff41
-rw-r--r--.azure-pipelines/steps.yml39
2 files changed, 80 insertions, 0 deletions
diff --git a/.azure-pipelines/rbreadline.diff b/.azure-pipelines/rbreadline.diff
new file mode 100644
index 0000000000..c139577610
--- /dev/null
+++ b/.azure-pipelines/rbreadline.diff
@@ -0,0 +1,41 @@
+diff --git a/rbreadline.rb b/rbreadline.rb
+index c710961..e35408c 100644
+--- a/rbreadline.rb
++++ b/rbreadline.rb
+@@ -16,6 +16,7 @@ end
+
+ module RbReadline
+ require 'etc'
++ require 'io/console'
+
+ RL_LIBRARY_VERSION = "5.2"
+ RL_READLINE_VERSION = 0x0502
+@@ -1092,6 +1093,9 @@ module RbReadline
+ @current_readline_init_include_level = 0
+ @current_readline_init_lineno = 0
+
++ # Used in windows
++ @is_pipe = false
++
+ ENV["HOME"] ||= "#{ENV["HOMEDRIVE"]}#{ENV["HOMEPATH"]}"
+ if !File.directory? ENV["HOME"]
+ raise RuntimeError.new("HOME environment variable (or HOMEDRIVE and HOMEPATH) must be set and point to a directory")
+@@ -4490,6 +4494,10 @@ module RbReadline
+ end
+
+ def rl_getc(stream)
++ # below added as test for whether we're connected to a pipe or a keyboard.
++ # Pipe connection is probably running under a test suite.
++ return (stream.getc || EOF rescue EOF) if @is_pipe
++
+ while (@kbhit.Call == 0)
+ # If there is no input, yield the processor for other threads
+ sleep(@_keyboard_input_timeout)
+@@ -4740,6 +4748,7 @@ module RbReadline
+ def readline_internal_charloop()
+ lastc = -1
+ eof_found = false
++ @is_pipe = (!@rl_outstream.winsize rescue true)
+
+ while (!@rl_done)
+ lk = @_rl_last_command_was_kill
diff --git a/.azure-pipelines/steps.yml b/.azure-pipelines/steps.yml
new file mode 100644
index 0000000000..733ca0998e
--- /dev/null
+++ b/.azure-pipelines/steps.yml
@@ -0,0 +1,39 @@
+steps:
+
+- task: UseRubyVersion@0
+ inputs:
+ versionSpec: '= 2.4'
+
+- script: |
+ ruby -v
+ ridk version
+ displayName: 'ruby -v + ridk version'
+
+- script: |
+ mkdir tmp
+ cd tmp
+ mkdir home
+ displayName: 'work around readline crash (for https://github.com/bundler/bundler/issues/6902)'
+
+- script: |
+ git apply --ignore-space-change --ignore-whitespace .azure-pipelines\rbreadline.diff --directory=C:/hostedtoolcache/windows/Ruby/2.4.3/x64/lib/ruby/site_ruby --unsafe-paths
+ displayName: 'patch local readline implementation (for https://github.com/bundler/bundler/issues/6907)'
+
+- script: |
+ ruby bin/rake spec:deps
+ displayName: 'ruby bin/rake spec:deps'
+
+- script: |
+ gem install --no-document --conservative rspec_junit_formatter
+ displayName: 'gem install rspec_junit_formatter'
+
+- script: |
+ ruby -r rspec_junit_formatter bin/rspec --format progress --format RspecJunitFormatter -o rspec/bundler-junit-results.xml || exit 0
+ displayName: 'ruby bin/rspec'
+
+- task: PublishTestResults@2
+ inputs:
+ testRunner: JUnit
+ testResultsFiles: rspec/bundler-junit-results.xml
+ displayName: Publish test results
+ condition: succeededOrFailed()