Commit 2c04ee94 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

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

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