lib/bosh/stemcell/build_environment.rb in bosh-stemcell-1.2427.0 vs lib/bosh/stemcell/build_environment.rb in bosh-stemcell-1.2446.0
- old
+ new
@@ -34,20 +34,20 @@
def os_image_rspec_command
[
"cd #{STEMCELL_SPECS_DIR};",
"OS_IMAGE=#{os_image_tarball_path}",
'bundle exec rspec -fd',
- "spec/os_image/#{operating_system.name}_spec.rb",
+ "spec/os_image/#{operating_system_spec_name}_spec.rb",
].join(' ')
end
def stemcell_rspec_command
[
"cd #{STEMCELL_SPECS_DIR};",
"STEMCELL_IMAGE=#{image_file_path}",
"bundle exec rspec -fd#{exclude_exclusions}",
- "spec/stemcells/#{operating_system.name}_spec.rb",
+ "spec/stemcells/#{operating_system_spec_name}_spec.rb",
"spec/stemcells/#{agent.name}_agent_spec.rb",
"spec/stemcells/#{infrastructure.name}_spec.rb",
].join(' ')
end
@@ -99,9 +99,17 @@
{ ignore_failures: true })
shell.run("sudo umount #{image_mount_point} 2> /dev/null", { ignore_failures: true })
shell.run("sudo rm -rf #{base_directory}", { ignore_failures: true })
+ end
+
+ def operating_system_spec_name
+ spec_name = operating_system.name
+ if operating_system.version
+ spec_name = "#{spec_name}_#{operating_system.version}"
+ end
+ spec_name
end
def prepare_build_path
FileUtils.rm_rf(build_path, verbose: true) if File.exist?(build_path)
FileUtils.mkdir_p(build_path, verbose: true)