Allwpilib build. Creating a new platform, how do you disable the HAL Simulator test

I’ve created a new platform in allwpilib (and all the required sub-projects).

I can get it to build mostly except it keeps trying to run the simulator test code on my new hal.

This HAL is not simulator based.

I haven’t found out how to disable the tests. Is that in native-utils?

@thadhouse can respond here, but this might be better as an issue or discussion on GitHub.

Not sure if I found it or if this was just a big hammer.

It disables google test for all cross compiler toolchains. This isn’t a cross compiler.
Maybe I’ll post it on github.

    @Validate
@CompileStatic
// TODO: Move this to tc plugin
void disableCrossTests(BinaryContainer binaries, ExtensionContainer extContainer) {
    final ToolchainExtension ext = extContainer.getByType(ToolchainExtension.class);

    for (GoogleTestTestSuiteBinarySpec binary : binaries.withType(GoogleTestTestSuiteBinarySpec.class)) {
        if (ext.getCrossCompilers().findByName(binary.getTargetPlatform().getName()) != null) {
          setBuildableFalseDynamically(binary)
        }
    }
}

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.