Skip to content

Commit

Permalink
(Re)-Add tests for GenRule.
Browse files Browse the repository at this point in the history
Reverts commit 4bf8cc3.
With fix for #2408.

--
PiperOrigin-RevId: 145544771
MOS_MIGRATED_REVID=145544771
  • Loading branch information
katre authored and laszlocsomor committed Jan 25, 2017
1 parent 752b61e commit 17a1ae9
Show file tree
Hide file tree
Showing 6 changed files with 1,155 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ public ConfiguredTarget create(RuleContext ruleContext)
FilesToRunProvider genruleSetup =
ruleContext.getPrerequisite("$genrule_setup", Mode.HOST, FilesToRunProvider.class);
inputs.addAll(genruleSetup.getFilesToRun());
List<String> argv = commandHelper.buildCommandLine(command, inputs, ".genrule_script.sh");
List<String> argv = commandHelper.buildCommandLine(command, inputs, ".genrule_script.sh",
ImmutableMap.copyOf(executionInfo));

if (ruleContext.attributes().get("stamp", Type.BOOLEAN)) {
inputs.add(ruleContext.getAnalysisEnvironment().getStableWorkspaceStatusArtifact());
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/com/google/devtools/build/lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1024,8 +1024,10 @@ java_test(
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/cmdline",
"//src/main/java/com/google/devtools/build/lib/rules/cpp",
"//src/main/protobuf:crosstool_config_java_proto",
"//src/test/java/com/google/devtools/build/lib:actions_testutil",
"//src/test/java/com/google/devtools/build/lib:packages_testutil",
"//third_party:guava",
"//third_party:junit4",
"//third_party:truth",
Expand Down
Loading

0 comments on commit 17a1ae9

Please sign in to comment.