tests: fix cargo test on Windows

Summary: A recent changed made some PyByteArrayObject logic require a python version number. We specify it via buck and via make, but this cargo test logic didn't. Let's add it.

Differential Revision: D38261443

fbshipit-source-id: ce7e794f99d0e0acf890c615f6f9c93b4ab68689
This commit is contained in:
Durham Goode 2022-08-08 11:39:20 -07:00 committed by Facebook GitHub Bot
parent 0d7d2e9dce
commit 5ceb8c2281

View File

@ -24,6 +24,7 @@ def extraargs(manifestpath):
def runtest(manifestpath):
cargo = os.getenv("CARGO", "cargo")
os.environ["RUSTFLAGS"] = "--cfg=Py_38"
name = os.path.dirname(manifestpath)
try:
os.unlink(os.path.join(name, "Cargo.lock"))