mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Remove framework load, disable mac timeout test (#1676)
* Remove system includes from all mac builds * Disable java watchdog on mac
This commit is contained in:
committed by
Peter Johnson
parent
1c454b000f
commit
698edfda9d
@@ -50,6 +50,22 @@ class SingleNativeBuild implements Plugin<Project> {
|
||||
|
||||
@CompileStatic
|
||||
static class Rules extends RuleSource {
|
||||
@Mutate
|
||||
@CompileStatic
|
||||
void removeMacSystemIncludes(ModelMap<Task> tasks, BinaryContainer binaries) {
|
||||
binaries.each {
|
||||
if (!(it instanceof NativeBinarySpec)) {
|
||||
return
|
||||
}
|
||||
NativeBinarySpec nativeBin = (NativeBinarySpec)it
|
||||
if (nativeBin.targetPlatform.operatingSystem.isMacOsX()) {
|
||||
nativeBin.tasks.withType(AbstractNativeSourceCompileTask) { AbstractNativeSourceCompileTask compileTask->
|
||||
compileTask.getSystemIncludes().setFrom()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Mutate
|
||||
@CompileStatic
|
||||
void setupSingleNativeBuild(ModelMap<Task> tasks, ComponentSpecContainer components, BinaryContainer binaryContainer, ProjectLayout projectLayout) {
|
||||
|
||||
@@ -62,7 +62,11 @@ TEST(WatchdogTest, Reset) {
|
||||
EXPECT_EQ(0u, watchdogCounter) << "Watchdog triggered early";
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
TEST(WatchdogTest, DISABLED_SetTimeout) {
|
||||
#else
|
||||
TEST(WatchdogTest, SetTimeout) {
|
||||
#endif
|
||||
uint32_t watchdogCounter = 0;
|
||||
|
||||
Watchdog watchdog(1.0, [&] { watchdogCounter++; });
|
||||
|
||||
@@ -10,6 +10,8 @@ package edu.wpi.first.wpilibj;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledOnOs;
|
||||
import org.junit.jupiter.api.condition.OS;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
@@ -187,6 +189,7 @@ class WatchdogTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisabledOnOs(OS.MAC)
|
||||
void multiWatchdogTest() {
|
||||
final AtomicInteger watchdogCounter1 = new AtomicInteger(0);
|
||||
final AtomicInteger watchdogCounter2 = new AtomicInteger(0);
|
||||
|
||||
Reference in New Issue
Block a user