Commit 00902121 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

No binfmt_misc in CircleCI - adapt by directly calling mono

parent 450e3760
......@@ -385,10 +385,8 @@ def ParseAsnFileList(listOfFilenames: List[str]) -> None: # pylint: disable=inv
else:
(dummy, xmlAST) = tempfile.mkstemp()
os.fdopen(dummy).close()
# spawnResult = os.system("mono \""+asn1SccPath+"\" -ast \""+xmlAST+"\" \"" + "\" \"".join(listOfFilenames) + "\"")
asn1SccDir = os.path.dirname(os.path.abspath(asn1SccPath))
mono = "mono " if sys.argv[0].endswith('.py') and sys.platform.startswith('linux') else ""
spawnResult = os.system(mono + "\"" + asn1SccPath + "\" -customStg \"" + asn1SccDir + "/xml.stg:" + xmlAST + "\" -customStgAstVerion 4 \"" + "\" \"".join(listOfFilenames) + "\"")
spawnResult = os.system("mono \"" + asn1SccPath + "\" -customStg \"" + asn1SccDir + "/xml.stg:" + xmlAST + "\" -customStgAstVerion 4 \"" + "\" \"".join(listOfFilenames) + "\"")
if spawnResult != 0:
errCode = spawnResult / 256
if errCode == 1:
......@@ -411,7 +409,7 @@ def ParseAsnFileList(listOfFilenames: List[str]) -> None: # pylint: disable=inv
# We also need to mark the artificial types -
# So spawn the custom type output at level 1 (unfiltered)
# and mark any types not inside it as artificial.
os.system(mono + "\"" + asn1SccPath + "\" -customStg \"" + asn1SccDir + "/xml.stg:" + xmlAST + "2\" -customStgAstVerion 1 \"" + "\" \"".join(listOfFilenames) + "\"")
os.system("mono \"" + asn1SccPath + "\" -customStg \"" + asn1SccDir + "/xml.stg:" + xmlAST + "2\" -customStgAstVerion 1 \"" + "\" \"".join(listOfFilenames) + "\"")
realTypes = {}
for line in os.popen("grep 'ExportedType\>' \"" + xmlAST + "2\"").readlines(): # pylint: disable=anomalous-backslash-in-string
line = re.sub(r'^.*Name="', '', line.strip())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment