Skip to content

Speed-up unit tests#6

Merged
nunoplopes merged 3 commits intoCpp2Rust:masterfrom
lucic71:build-time
Apr 17, 2026
Merged

Speed-up unit tests#6
nunoplopes merged 3 commits intoCpp2Rust:masterfrom
lucic71:build-time

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented Apr 16, 2026

Sub-part of #3

First unit test compiles libcc2rs and rules in cargo-target, then all unit-tests use the precompiled libraries from cargo-target instead of building them each time.

@nunoplopes
Copy link
Copy Markdown
Contributor

Isn't this missing the removal of Cargo.toml, or is that part of another PR?

@lucic71
Copy link
Copy Markdown
Contributor Author

lucic71 commented Apr 16, 2026

Isn't this missing the removal of Cargo.toml, or is that part of another PR?

I removed it now, thanks!

import difflib, os, re, shutil, random
import tomli

def read_rust_version():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change (turning into a method) is not useful; it makes the code slower for no benefit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I also make sharedTargetDir and cargoEnv free functions instead of methods?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@nunoplopes nunoplopes merged commit d33dad4 into Cpp2Rust:master Apr 17, 2026
5 checks passed
@lucic71 lucic71 deleted the build-time branch April 29, 2026 13:20
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 this pull request may close these issues.

2 participants