Skip to content

Commit

Permalink
Fix a bunch of test cases that break if genfiles == bin.
Browse files Browse the repository at this point in the history
A few are left, but they will require actual code changes (as opposed to changes to test cases only)

RELNOTES: None.
PiperOrigin-RevId: 162453092
  • Loading branch information
lberki authored and aehlig committed Jul 19, 2017
1 parent 982c751 commit 48e8b9f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ public void testBasics() throws Exception {
.isEqualTo(outputDirPrefix + "/bin");
assertThat(config.getIncludeDirectory(RepositoryName.MAIN).getPath().toString())
.isEqualTo(outputDirPrefix + "/include");
assertThat(config.getGenfilesDirectory(RepositoryName.MAIN).getPath().toString())
.isEqualTo(outputDirPrefix + "/genfiles");
assertThat(config.getTestLogsDirectory(RepositoryName.MAIN).getPath().toString())
.isEqualTo(outputDirPrefix + "/testlogs");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ public void testExpandedLinkopts() throws Exception {
CppLinkAction action =
(CppLinkAction) getGeneratingAction(getOnlyElement(getFilesToBuild(target)));
assertThat(action.getLinkCommandLine().getLinkopts()).containsExactly(
String.format("-Wl,@%s/genfiles/a/a.lds", getTargetConfiguration().getOutputDirectory(
String.format("-Wl,@%s/a/a.lds", getTargetConfiguration().getGenfilesDirectory(
RepositoryName.MAIN).getExecPath().getPathString()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,6 @@ public void testIncludesIquoteFlagForGenFilesRoot() throws Exception {
BuildConfiguration config = getAppleCrosstoolConfiguration();
assertContainsSublist(compileAction.getArguments(), ImmutableList.of(
"-iquote", config.getGenfilesFragment().getSafePathString()));
assertThat(compileAction.getArguments()).doesNotContain(
config.getBinFragment().getSafePathString());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
import com.google.devtools.build.lib.analysis.util.ScratchAttributeWriter;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.cmdline.RepositoryName;
import com.google.devtools.build.lib.packages.Attribute.SplitTransition;
import com.google.devtools.build.lib.packages.util.MockJ2ObjcSupport;
import com.google.devtools.build.lib.packages.util.MockObjcSupport;
Expand Down Expand Up @@ -188,7 +189,10 @@ protected String configurationBin(
protected String configurationGenfiles(
String arch, ConfigurationDistinguisher configurationDistinguisher,
DottedVersion minOsVersion) {
return configurationDir(arch, configurationDistinguisher, minOsVersion) + "genfiles";
return configurationDir(arch, configurationDistinguisher, minOsVersion)
+ getTargetConfiguration().getGenfilesDirectory(RepositoryName.MAIN)
.getExecPath().getBaseName();

}

private String configurationDir(
Expand Down

0 comments on commit 48e8b9f

Please sign in to comment.