File tree Expand file tree Collapse file tree 3 files changed +1732
-52
lines changed Expand file tree Collapse file tree 3 files changed +1732
-52
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ bzl_library(
62
62
"//lib:xcode_support" ,
63
63
"//xcode:available_xcodes" ,
64
64
"//xcode:xcode_config" ,
65
+ "//xcode:xcode_config_alias" ,
65
66
"//xcode:xcode_version" ,
66
67
"@bazel_skylib//lib:unittest" ,
67
68
],
Original file line number Diff line number Diff line change 14
14
15
15
"""Common Starlark helpers used by apple_support tests."""
16
16
17
+ load ("@bazel_skylib//lib:unittest.bzl" , "analysistest" )
18
+
17
19
visibility (["//test/..." ])
18
20
19
21
# Common tags used for all test fixtures to ensure that they don't build unless
@@ -22,6 +24,26 @@ FIXTURE_TAGS = [
22
24
"manual" ,
23
25
]
24
26
27
+ def find_action (env , mnemonic ):
28
+ """Finds the first action with the given mnemonic in the target under test.
29
+
30
+ This generates an analysis test failure if no action was found.
31
+
32
+ Args:
33
+ env: The analysis test environment.
34
+ mnemonic: The mnemonic to find.
35
+
36
+ Returns:
37
+ The first action matching the mnemonic, or `None` if none was found.
38
+ """
39
+ actions = analysistest .target_actions (env )
40
+ for action in actions :
41
+ if action .mnemonic == mnemonic :
42
+ return action
43
+
44
+ analysistest .fail (env , "No '{}' action found" .format (mnemonic ))
45
+ return None
46
+
25
47
def make_unique_namer (* , prefix , index ):
26
48
"""Returns a function used to generate unique names in a package.
27
49
You can’t perform that action at this time.
0 commit comments