mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-15 09:17:44 -04:00
Copying CBMC proofs from aws/amazon-freertos repo ./tools/cbmc to this repo ./FreeRTOS/Test/CBMC as is.
The commit ID in aws/amazon-freertos is 0c8e0217f2a43bdeb364b58ae01c6c259e03ef1b.
This commit is contained in:
parent
9f316c246b
commit
8156f64d1c
174 changed files with 9245 additions and 0 deletions
36
FreeRTOS/Test/CBMC/patches/patch.py
Executable file
36
FreeRTOS/Test/CBMC/patches/patch.py
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from glob import glob
|
||||
|
||||
from patches_constants import PATCHES_DIR
|
||||
|
||||
def patch():
|
||||
if os.path.isfile("patched"):
|
||||
sys.exit()
|
||||
|
||||
applied_patches = []
|
||||
failed_patches = []
|
||||
for tmpfile in glob(os.path.join(PATCHES_DIR, "*.patch")):
|
||||
print("patch", tmpfile)
|
||||
result = subprocess.run(["git", "apply", tmpfile],
|
||||
cwd=os.path.join("..", "..", ".."))
|
||||
if result.returncode:
|
||||
failed_patches.append(tmpfile)
|
||||
logging.error("patching failed: %s", tmpfile)
|
||||
else:
|
||||
applied_patches.append(tmpfile)
|
||||
|
||||
with open(os.path.join(PATCHES_DIR, "patched"), "w") as outp:
|
||||
print("Success:", file=outp)
|
||||
print("\n".join(map(lambda x: "\t" + x, applied_patches)), file=outp)
|
||||
|
||||
print("Failure:", file=outp)
|
||||
print("\n".join(map(lambda x: "\t" + x, failed_patches)), file=outp)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
patch()
|
Loading…
Add table
Add a link
Reference in a new issue