import subprocess
import sys
import os
def run(cmd, **kwargs):
print(f"> Running: {' '.join(cmd)}")
subprocess.run(cmd, check=True, **kwargs)
def main():
here = os.path.dirname(os.path.abspath(__file__))
testall = os.path.join(here, "testall.py")
try:
run(["rustup", "default", "stable"])
run([sys.executable, testall, "-C", "-N"])
run([sys.executable, testall, "-N"])
run(["rustup", "default", "nightly"])
run([sys.executable, testall, "-C"])
run([sys.executable, testall, "-M"])
print("All runs completed successfully.")
except subprocess.CalledProcessError as e:
print(f"Step failed (exit code {e.returncode}): {e.cmd}", file=sys.stderr)
sys.exit(e.returncode)
if __name__ == "__main__":
main()