Skip to content

Commit

Permalink
Setup mock tools for genrule in integration tests.
Browse files Browse the repository at this point in the history
The current genrule setup is missing `genrule-setup.sh` file, making each `genrule` target fail in tests. Use `MockGenruleSupport` which sets up all necessary files instead of creating only the `BUILD` file.

PiperOrigin-RevId: 412086839
  • Loading branch information
alexjski authored and copybara-github committed Nov 24, 2021
1 parent afb499e commit 28409cf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.google.devtools.build.lib.packages.util.BazelMockCcSupport;
import com.google.devtools.build.lib.packages.util.BazelMockPythonSupport;
import com.google.devtools.build.lib.packages.util.MockCcSupport;
import com.google.devtools.build.lib.packages.util.MockGenruleSupport;
import com.google.devtools.build.lib.packages.util.MockPlatformSupport;
import com.google.devtools.build.lib.packages.util.MockPythonSupport;
import com.google.devtools.build.lib.packages.util.MockToolsConfig;
Expand Down Expand Up @@ -268,7 +269,7 @@ public void setupMockClient(MockToolsConfig config, List<String> workspaceConten
" tags = ['__ANDROID_RULES_MIGRATION__'],",
")");

config.create("embedded_tools/tools/genrule/BUILD", "exports_files(['genrule-setup.sh'])");
MockGenruleSupport.setup(config);

config.create(
"embedded_tools/tools/test/BUILD",
Expand Down

0 comments on commit 28409cf

Please sign in to comment.