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:
Thad House
2019-05-05 13:16:47 -07:00
committed by Peter Johnson
parent 1c454b000f
commit 698edfda9d
3 changed files with 23 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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++; });

View File

@@ -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);