зеркало из https://github.com/Azure/autorest.git
Resolved issue with Jenkins build fail.
This commit is contained in:
Родитель
eadf894ea2
Коммит
2774382733
|
@ -167,3 +167,4 @@ Thumbs.db
|
|||
#old nuget restore folder
|
||||
.nuget/
|
||||
AutoRest/Generators/Ruby/*Tests/Gemfile.lock
|
||||
AutoRest/Generators/Ruby/*/RspecTests/Generated/*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/azure_report'
|
||||
$: << 'RspecTests/Generated/azure_report'
|
||||
|
||||
require 'azure_report'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/azure_special_properties'
|
||||
$: << 'RspecTests/Generated/azure_special_properties'
|
||||
|
||||
require 'rspec'
|
||||
require 'securerandom'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/azure_url'
|
||||
$: << 'RspecTests/Generated/azure_url'
|
||||
|
||||
require 'rspec'
|
||||
require 'securerandom'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/head'
|
||||
$: << 'RspecTests/Generated/head'
|
||||
|
||||
require 'rspec'
|
||||
require 'head'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/lro'
|
||||
$: << 'RspecTests/Generated/lro'
|
||||
|
||||
require 'rspec'
|
||||
require 'lro'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/paging'
|
||||
$: << 'RspecTests/Generated/paging'
|
||||
|
||||
require 'rspec'
|
||||
require 'paging'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/resource_flattening'
|
||||
$: << 'RspecTests/Generated/resource_flattening'
|
||||
|
||||
require 'securerandom'
|
||||
require 'resource_flattening'
|
||||
|
|
|
@ -2,21 +2,27 @@
|
|||
|
||||
require 'open3'
|
||||
|
||||
server_dir = "#{File.dirname(__FILE__)}/../../../../AcceptanceTests/server/"
|
||||
server_dir = "#{File.dirname(__FILE__)}/../../../AcceptanceTests/server/"
|
||||
Dir.chdir(server_dir){
|
||||
system('npm install')
|
||||
}
|
||||
random_port = 3000 + Random.rand(2000)
|
||||
Dir.chdir("#{server_dir}/startup"){
|
||||
ENV['PORT'] = random_port.to_s
|
||||
@stdin, @stdout, @stderr, @wait_thr = Open3.popen3('node www.js')
|
||||
@pid = @wait_thr[:pid]
|
||||
}
|
||||
ENV['StubServerURI'] = 'http://localhost:3000'
|
||||
|
||||
ENV['StubServerURI'] = "http://localhost:#{random_port}"
|
||||
|
||||
Dir.chdir("#{File.dirname(__FILE__)}/.."){
|
||||
@exit_code = system('bundle exec rspec RspecTests/*_spec.rb')
|
||||
@exit_code = system("bundle exec rspec #{Dir['RspecTests/*_spec.rb'].join(' ')}")
|
||||
}
|
||||
|
||||
@stdin.close
|
||||
@stdout.close
|
||||
@stderr.close
|
||||
|
||||
Process.kill(9, @pid)
|
||||
|
||||
exit @exit_code ? 0 : 1
|
|
@ -1,7 +1,7 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests'
|
||||
$: << 'RspecTests/array'
|
||||
$: << 'RspecTests/Generated/array'
|
||||
|
||||
require 'rspec'
|
||||
require 'body_array'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests'
|
||||
$: << 'RspecTests/boolean'
|
||||
$: << 'RspecTests/Generated/boolean'
|
||||
|
||||
require 'body_boolean'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/byte'
|
||||
$: << 'RspecTests/Generated/byte'
|
||||
|
||||
require 'body_byte'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/complex'
|
||||
$: << 'RspecTests/Generated/complex'
|
||||
|
||||
require 'base64'
|
||||
require 'body_complex'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/date'
|
||||
$: << 'RspecTests/Generated/date'
|
||||
|
||||
require 'rspec'
|
||||
require 'body_date'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/datetime'
|
||||
$: << 'RspecTests/Generated/datetime'
|
||||
|
||||
require 'rspec'
|
||||
require 'body_datetime'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/dictionary'
|
||||
$: << 'RspecTests/Generated/dictionary'
|
||||
$: << 'RspecTests'
|
||||
|
||||
require 'base64'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests'
|
||||
$: << 'RspecTests/header_folder'
|
||||
$: << 'RspecTests/Generated/header_folder'
|
||||
|
||||
|
||||
require "base64"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/http_infrastructure'
|
||||
$: << 'RspecTests/Generated/http_infrastructure'
|
||||
$: << 'RspecTests'
|
||||
|
||||
require 'rspec'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/integer'
|
||||
$: << 'RspecTests/Generated/integer'
|
||||
|
||||
require 'body_integer'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/number'
|
||||
$: << 'RspecTests/Generated/number'
|
||||
|
||||
require 'body_number'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/url_items'
|
||||
$: << 'RspecTests/Generated/url_items'
|
||||
|
||||
require 'url'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/report'
|
||||
$: << 'RspecTests/Generated/report'
|
||||
|
||||
require 'report'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/required_optional'
|
||||
$: << 'RspecTests/Generated/required_optional'
|
||||
|
||||
require 'required_optional'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$: << 'RspecTests/string'
|
||||
$: << 'RspecTests/Generated/string'
|
||||
|
||||
require 'body_string'
|
||||
|
||||
|
|
|
@ -2,21 +2,27 @@
|
|||
|
||||
require 'open3'
|
||||
|
||||
server_dir = "#{File.dirname(__FILE__)}/../../../../AcceptanceTests/server/"
|
||||
server_dir = "#{File.dirname(__FILE__)}/../../../AcceptanceTests/server/"
|
||||
Dir.chdir(server_dir){
|
||||
system('npm install')
|
||||
}
|
||||
random_port = 3000 + Random.rand(2000)
|
||||
Dir.chdir("#{server_dir}/startup"){
|
||||
ENV['PORT'] = random_port.to_s
|
||||
@stdin, @stdout, @stderr, @wait_thr = Open3.popen3('node www.js')
|
||||
@pid = @wait_thr[:pid]
|
||||
}
|
||||
ENV['StubServerURI'] = 'http://localhost:3000'
|
||||
|
||||
ENV['StubServerURI'] = "http://localhost:#{random_port}"
|
||||
|
||||
Dir.chdir("#{File.dirname(__FILE__)}/.."){
|
||||
@exit_code = system('bundle exec rspec RspecTests/*_spec.rb')
|
||||
@exit_code = system("bundle exec rspec #{Dir['RspecTests/*_spec.rb'].join(' ')}")
|
||||
}
|
||||
|
||||
@stdin.close
|
||||
@stdout.close
|
||||
@stderr.close
|
||||
|
||||
Process.kill(9, @pid)
|
||||
|
||||
exit @exit_code ? 0 : 1
|
|
@ -158,7 +158,7 @@
|
|||
<!-- Run tests. -->
|
||||
<Target Name="Test" DependsOnTargets="RestoreNugetPackages;RestoreRubyDependencies">
|
||||
<Exec Command="gulp test"/>
|
||||
</Target>
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- This property is used by the continuous intergration job.
|
||||
|
|
|
@ -146,11 +146,10 @@ gulp.task('regenerate:expected:rubyazure', function(cb){
|
|||
'outputBaseDir': 'AutoRest/Generators/Ruby/Azure.Ruby.Tests',
|
||||
'inputBaseDir': 'AutoRest/Generators/CSharp/Azure.CSharp.Tests',
|
||||
'mappings': rubyAzureMappings,
|
||||
'outputDir': 'bin/RspecTests',
|
||||
'outputDir': 'RspecTests/Generated',
|
||||
'codeGenerator': 'Azure.Ruby',
|
||||
'nsPrefix': 'MyNamespace'
|
||||
}, cb);
|
||||
gulp.src('AutoRest/Generators/Ruby/Azure.Ruby.Tests/RspecTests/*').pipe(gulp.dest('AutoRest/Generators/Ruby/Azure.Ruby.Tests/bin/RspecTests'));
|
||||
})
|
||||
|
||||
gulp.task('regenerate:expected:ruby', function(cb){
|
||||
|
@ -158,11 +157,10 @@ gulp.task('regenerate:expected:ruby', function(cb){
|
|||
'outputBaseDir': 'AutoRest/Generators/Ruby/Ruby.Tests',
|
||||
'inputBaseDir': 'AutoRest/Generators/CSharp/CSharp.Tests',
|
||||
'mappings': rubyMappings,
|
||||
'outputDir': 'bin/RspecTests',
|
||||
'outputDir': 'RspecTests/Generated',
|
||||
'codeGenerator': 'Ruby',
|
||||
'nsPrefix': 'MyNamespace'
|
||||
}, cb);
|
||||
gulp.src('AutoRest/Generators/Ruby/Ruby.Tests/RspecTests/*').pipe(gulp.dest('AutoRest/Generators/Ruby/Ruby.Tests/bin/RspecTests'));
|
||||
})
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче