Commit 64972430 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras Committed by Thanassis Tsiodras
Browse files

Ask ASN1SCC for 'all boards' support in a consistent manner that preserves legacy builds.

parent 208912f3
......@@ -50,7 +50,7 @@ def OnStartup(unused_modelingLanguage: str, asnFiles: List[str], outputDir: str,
extraFlags = os.getenv("ASN1SCC_FLAGS") or ""
os.system(
("mono " if sys.platform.startswith('linux') else "") +
"\"{}\" -typePrefix asn1Scc -equal --target allboards -Ada {} -o \"".format(asn1SccPath, extraFlags) +
"\"{}\" -typePrefix asn1Scc -equal -Ada {} -o \"".format(asn1SccPath, extraFlags) +
outputDir + "\" \"" + "\" \"".join(asnFiles) + "\"")
# os.system("rm -f \"" + outputDir + "\"/*.adb")
......
......@@ -244,7 +244,7 @@ types). This used to cover Dumpable C/Ada Types and OG headers.'''
if asnFile is not None:
if not asn1SccPath:
panic("ASN1SCC seems not installed on your system (asn1.exe not found in PATH).\n") # pragma: no cover
os.system('mono "{}" -typePrefix asn1Scc {} --target allboards -Ada -equal -o "{}" "{}"'
os.system('mono "{}" -typePrefix asn1Scc {} -Ada -equal -o "{}" "{}"'
.format(asn1SccPath, extraFlags, outputDir, '" "'.join([asnFile])))
......@@ -501,6 +501,13 @@ def main() -> None:
import pdb # pragma: no cover pylint: disable=wrong-import-position,wrong-import-order
pdb.set_trace() # pragma: no cover
use_ASN1SCC_allboards_support = "-allboards" in sys.argv
if use_ASN1SCC_allboards_support:
sys.argv.remove("-allboards") # pragma: no cover
extraFlags = os.getenv("ASN1SCC_FLAGS") or ""
extraFlags += " --target allboards "
os.putenv("ASN1SCC_FLAGS", extraFlags)
if "-profile" in sys.argv:
sys.argv.remove("-profile")
import cProfile
......
......@@ -86,6 +86,14 @@ def main() -> None:
import pdb # pragma: no cover pylint: disable=wrong-import-position,wrong-import-order
pdb.set_trace() # pragma: no cover
use_ASN1SCC_allboards_support = "-allboards" in sys.argv
if use_ASN1SCC_allboards_support:
sys.argv.remove("-allboards") # pragma: no cover
extraFlags = os.getenv("ASN1SCC_FLAGS") or ""
extraFlags += " --target allboards "
os.putenv("ASN1SCC_FLAGS", extraFlags)
if "-v" in sys.argv:
import pkg_resources # pragma: no cover
version = pkg_resources.require("dmt")[0].version # pragma: no cover
......
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