This repository was archived by the owner on Nov 10, 2023. It is now read-only.
File tree 5 files changed +11
-11
lines changed
features/go/testdata/go_test
jvm/java/testdata/testx_rule
5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 26
26
*
27
27
* <p>TODO(bobyf): need a slightly better api or a new rule as a library doesn't quite make sense.
28
28
*/
29
- public interface HasTestRunnerLibrary {
29
+ public interface HasTestRunner {
30
30
31
31
/** @return the target to the library containing the test runner */
32
- Optional <BuildTarget > getRunnerLibrary ();
32
+ Optional <BuildTarget > getRunner ();
33
33
34
34
/**
35
35
* @return the freeform (for now) specs as required for running tests. For example, cmds,
Original file line number Diff line number Diff line change 39
39
import com .facebook .buck .core .rules .impl .NoopBuildRuleWithDeclaredAndExtraDeps ;
40
40
import com .facebook .buck .core .sourcepath .SourcePath ;
41
41
import com .facebook .buck .core .sourcepath .resolver .impl .DefaultSourcePathResolver ;
42
- import com .facebook .buck .core .test .rule .HasTestRunnerLibrary ;
42
+ import com .facebook .buck .core .test .rule .HasTestRunner ;
43
43
import com .facebook .buck .core .toolchain .ToolchainProvider ;
44
44
import com .facebook .buck .core .toolchain .tool .Tool ;
45
45
import com .facebook .buck .core .util .immutables .BuckStyleImmutable ;
@@ -260,10 +260,10 @@ public BuildRule createBuildRule(
260
260
GoBinary testMain ;
261
261
if (args .getSpecs ().isPresent ()) {
262
262
UserVerify .checkArgument (
263
- args .getRunnerLibrary ().isPresent (),
263
+ args .getRunner ().isPresent (),
264
264
"runner_library should be specified for rules implementing test protocol" );
265
265
266
- BuildRule library = graphBuilder .requireRule (args .getRunnerLibrary ().get ());
266
+ BuildRule library = graphBuilder .requireRule (args .getRunner ().get ());
267
267
UserVerify .verify (
268
268
library instanceof GoLibrary , "runner_library should be a go_library for go_test" );
269
269
GoLibrary runnerLibrary = (GoLibrary ) library ;
@@ -552,7 +552,7 @@ interface AbstractGoTestDescriptionArg
552
552
HasContacts ,
553
553
HasDeclaredDeps ,
554
554
HasSrcs ,
555
- HasTestRunnerLibrary ,
555
+ HasTestRunner ,
556
556
HasTestTimeout ,
557
557
HasGoLinkable {
558
558
Optional <BuildTarget > getLibrary ();
Original file line number Diff line number Diff line change 33
33
import com .facebook .buck .core .sourcepath .BuildTargetSourcePath ;
34
34
import com .facebook .buck .core .sourcepath .SourcePath ;
35
35
import com .facebook .buck .core .sourcepath .resolver .impl .DefaultSourcePathResolver ;
36
- import com .facebook .buck .core .test .rule .HasTestRunnerLibrary ;
36
+ import com .facebook .buck .core .test .rule .HasTestRunner ;
37
37
import com .facebook .buck .core .toolchain .ToolchainProvider ;
38
38
import com .facebook .buck .core .util .immutables .BuckStyleImmutable ;
39
39
import com .facebook .buck .cxx .CxxDescriptionEnhancer ;
@@ -165,7 +165,7 @@ public BuildRule createBuildRule(
165
165
.setExpanders (MACRO_EXPANDERS )
166
166
.build ();
167
167
168
- Optional <BuildTarget > runner = args .getRunnerLibrary ();
168
+ Optional <BuildTarget > runner = args .getRunner ();
169
169
Optional <ImmutableMap <String , StringWithMacros >> runnerSpecs = args .getSpecs ();
170
170
if (runnerSpecs .isPresent ()) {
171
171
JavaTestRunner testRunner ;
@@ -306,7 +306,7 @@ default ForkMode getForkMode() {
306
306
307
307
@ BuckStyleImmutable
308
308
@ Value .Immutable
309
- interface AbstractJavaTestDescriptionArg extends CoreArg , HasTestRunnerLibrary {}
309
+ interface AbstractJavaTestDescriptionArg extends CoreArg , HasTestRunner {}
310
310
311
311
public static class CxxLibraryEnhancement {
312
312
public final BuildRuleParams updatedParams ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ go_test(
32
32
"resources_test.go",
33
33
],
34
34
resources = ["testdata/input"],
35
- runner_library = ":runner",
35
+ runner = ":runner",
36
36
specs = {
37
37
"my": "spec",
38
38
"cmd": "out=\"$(abs_output testbin)\" && cd \$(dirname $out) && $out",
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ java_test_runner(
7
7
java_test(
8
8
name = "some_test",
9
9
srcs = ["SomeTest.java"],
10
- runner_library = ":runner",
10
+ runner = ":runner",
11
11
specs = {
12
12
"my": "spec",
13
13
"cmd": "java -jar $(abs_output testbin) $(abs_output classnames)",
You can’t perform that action at this time.
0 commit comments