-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add exec CLI command for auto instrumentation
- Loading branch information
1 parent
1fb8c8a
commit bdb6589
Showing
6 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require_relative "base" | ||
require_relative "../../test_optimisation/skippable_percentage/estimator" | ||
|
||
module Datadog | ||
module CI | ||
module CLI | ||
module Command | ||
class Exec < Base | ||
def initialize(args) | ||
super() | ||
|
||
@args = args | ||
end | ||
|
||
def exec | ||
rubyopts = [ | ||
"-rdatadog/ci/auto_instrument" | ||
] | ||
|
||
existing_rubyopt = ENV["RUBYOPT"] | ||
ENV["RUBYOPT"] = existing_rubyopt ? "#{existing_rubyopt} #{rubyopts.join(" ")}" : rubyopts.join(" ") | ||
|
||
Kernel.exec(*@args) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module Datadog | ||
module CI | ||
module CLI | ||
def self.exec: (String action) -> void | ||
def self.exec: (String action, ?Array[String] args) -> void | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Datadog | ||
module CI | ||
module CLI | ||
module Command | ||
class Exec < Base | ||
@args: Array[String] | ||
|
||
def initialize: (Array[String] args) -> void | ||
|
||
def exec: () -> void | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters