Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shorter task alias for C++ test execution #480

Open
calcmogul opened this issue Jan 5, 2021 · 6 comments
Open

Add shorter task alias for C++ test execution #480

calcmogul opened this issue Jan 5, 2021 · 6 comments

Comments

@calcmogul
Copy link
Member

calcmogul commented Jan 5, 2021

The following in build.gradle works, but it would be nice if GradleRIO provided it like simulateJava.

task simulateCpp {
    dependsOn 'simulateFrcUserProgram' + wpi.platforms.desktop.capitalize() + 'DebugExecutable'
}
@calcmogul
Copy link
Member Author

The same could be said for test aliases like this:

task test {
    dependsOn 'testRelease'
}

task testDebug {
    dependsOn 'runFrcUserProgramTest' + wpi.platforms.desktop.capitalize() + 'DebugGoogleTestExe'
}

task testRelease {
    dependsOn 'runFrcUserProgramTest' + wpi.platforms.desktop.capitalize() + 'ReleaseGoogleTestExe'
}

@sciencewhiz
Copy link
Contributor

This was resolved by the adition of simulateNative, right?

@calcmogul
Copy link
Member Author

Only the simulation part. testNativeDebug and testNativeDebug build the tests, but don't run them. There's still no equivalent of the test, testDebug, and testRelease tasks above.

@ThadHouse ThadHouse changed the title Add shorter task alias for C++ simulation Add shorter task alias for C++ test execution Jan 28, 2022
@ThadHouse
Copy link
Member

I renamed this to more fit what the issue is now.

@spacey-sooty
Copy link
Contributor

Are the C++ tests not run in the build task?

@calcmogul
Copy link
Member Author

calcmogul commented Jun 5, 2024

They are, but the build task builds way too much; it builds the athena binary, simulation binary, and test binary (plus debug and release versions of some of those, iirc). This takes a long time in C++. A test task should only build, say, the debug version of the test binary and run it.

Java already has this, so this gives C++ robot projects feature parity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants