mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-01 02:41:42 +00:00
Gradle build task improvements (#2164)
## Description This fixes a few problems with the Gradle `build` task and subtasks. 1. Spotless was being run on `node_modules`, resulting in errors for out-of-source files. This is now disabled. 2. All tests were running from the `build` task, resulting in unexpected windows popping up. Now only headless tests are run. 3. Headless tests were updated to run from the same root directory as the other tests. ## Meta Merge checklist: - [X] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [X] The description documents the _what_ and _why_ - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added
This commit is contained in:
@@ -25,6 +25,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.photonvision.common.util.TestUtils;
|
||||
|
||||
public class NetworkConfigTest {
|
||||
@Test
|
||||
@@ -39,13 +40,13 @@ public class NetworkConfigTest {
|
||||
@Test
|
||||
public void testDeserializeTeamNumberOrNtServerAddress() {
|
||||
{
|
||||
var folder = Path.of("test-resources/network-old-team-number");
|
||||
var folder = TestUtils.getResourcesFolderPath(true).resolve("network-old-team-number");
|
||||
var configMgr = new ConfigManager(folder, new LegacyConfigProvider(folder));
|
||||
configMgr.load();
|
||||
assertEquals("9999", configMgr.getConfig().getNetworkConfig().ntServerAddress);
|
||||
}
|
||||
{
|
||||
var folder = Path.of("test-resources/network-new-team-number");
|
||||
var folder = TestUtils.getResourcesFolderPath(true).resolve("network-new-team-number");
|
||||
var configMgr = new ConfigManager(folder, new LegacyConfigProvider(folder));
|
||||
configMgr.load();
|
||||
assertEquals("9999", configMgr.getConfig().getNetworkConfig().ntServerAddress);
|
||||
|
||||
Reference in New Issue
Block a user