Skip to content

Commit

Permalink
Correctly order creating the platforms and using them in tests.
Browse files Browse the repository at this point in the history
Work towards platform-based flags: bazelbuild#19409.

PiperOrigin-RevId: 621555402
Change-Id: Id3c70a34844f0ec4ba0ca690827d228acc3493b0
  • Loading branch information
katre authored and Kila2 committed May 13, 2024
1 parent 10148b6 commit 39c016d
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.google.devtools.build.lib.rules.java.JavaTestUtil;
import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand Down Expand Up @@ -60,13 +59,6 @@ public static List<Object[]> platformParameters() {

@Override
protected void useConfiguration(String... args) throws Exception {
super.useConfiguration(
ObjectArrays.concat(
args, "--platforms=//" + PLATFORMS_PACKAGE_PATH + ":" + targetPlatform));
}

@Before
public void setup() throws Exception {
JavaTestUtil.setupPlatform(
getAnalysisMock(),
mockToolsConfig,
Expand All @@ -75,6 +67,9 @@ public void setup() throws Exception {
targetPlatform,
targetOs,
targetCpu);
super.useConfiguration(
ObjectArrays.concat(
args, "--platforms=//" + PLATFORMS_PACKAGE_PATH + ":" + targetPlatform));
}

@Test
Expand Down

0 comments on commit 39c016d

Please sign in to comment.