Skip to content

Slather and DataDog CI collide due to searching for CodeCoverage directories #577

@Noobish1

Description

@Noobish1

So DataDog has a Swift Test Optimization SDK which happens to have an internal framework named CodeCoverage.

This code in project.rb does not like this framework as it thinks it's an old Xcode CodeCoverage data folder:

def profdata_coverage_dir
@profdata_coverage_dir ||= begin
raise StandardError, "The specified build directory (#{self.build_directory}) does not exist" unless File.exist?(self.build_directory)
dir = nil
if self.scheme
dir = Dir[File.join(build_directory,"/**/CodeCoverage/#{self.scheme}")].first
else
dir = Dir[File.join(build_directory,"/**/#{first_product_name}")].first
end
if dir == nil
# Xcode 7.3 moved the location of Coverage.profdata
dir = Dir[File.join(build_directory,"/**/CodeCoverage")].first

this leads to errors like:

slather-2.8.4/lib/slather/project.rb:607:in `find_binary_files': No product binary found in fastlaneDerivedDataOutput/Build/Products/Debug-iphonesimulator/DatadogSDKTesting.framework/Frameworks/CodeCoverage.framework/CodeCoverage. (StandardError)

I've got a fork with this change in it: da5f8e0

This seems to fix it but I'm not a ruby dev and I don't know this library much at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions