From 05cd4a2b81b81c3056ee7c7698b2a13be9630fed Mon Sep 17 00:00:00 2001 From: Henrik Wahlqvist Date: Mon, 7 Jul 2025 16:03:35 +0200 Subject: [PATCH] Don't generate VcDebug files if there are no variables Change-Id: I57c0d04ecaa08164e4654409ed40cfd01b63faef --- NOTICE | 864 ++++++++++++------ powertrain_build/build.py | 84 +- powertrain_build/ext_dbg.py | 82 +- powertrain_build/sched_funcs.py | 18 +- .../reference_files/VcDebug.a2l | 47 + .../reference_files/VcDebug.c | 29 + .../reference_files/VcDebugOutput.a2l | 47 + .../reference_files/VcDebugOutput.c | 29 + .../reference_files/VcDummyRaster.c | 11 + .../reference_files/VcDummyRaster.h | 6 + .../reference_files/VcExtINI.c | 2 + .../reference_files/VcExtINI.h | 4 + .../reference_files/ts_test.h | 4 + tests/powertrain_build/test_build.py | 65 +- tests/powertrain_build/test_ext_dbg.py | 43 +- tests/powertrain_build/test_sched_funcs.py | 68 +- 16 files changed, 980 insertions(+), 423 deletions(-) create mode 100644 tests/powertrain_build/reference_files/VcDebug.a2l create mode 100644 tests/powertrain_build/reference_files/VcDebug.c create mode 100644 tests/powertrain_build/reference_files/VcDebugOutput.a2l create mode 100644 tests/powertrain_build/reference_files/VcDebugOutput.c create mode 100644 tests/powertrain_build/reference_files/VcDummyRaster.c create mode 100644 tests/powertrain_build/reference_files/VcDummyRaster.h create mode 100644 tests/powertrain_build/reference_files/VcExtINI.h diff --git a/NOTICE b/NOTICE index 8fd388e..f70a268 100644 --- a/NOTICE +++ b/NOTICE @@ -12,7 +12,7 @@ Notices Report Content Components: -Coverage 7.9.1: http://nedbatchelder.com/code/modules/coverage.html : Apache License 2.0 +Coverage 7.9.2: http://nedbatchelder.com/code/modules/coverage.html : Apache License 2.0 exceptiongroup 1.3.0: https://github.com/python-trio/exceptiongroup : MIT License flake8 7.3.0: https://gitlab.com/pycqa/flake8 : MIT License gitdb 4.0.12: http://github.com/gitpython-developers/gitdb : BSD 3-clause "New" or "Revised" License @@ -32,7 +32,7 @@ pytest 8.4.1: http://pytest.org : MIT License python3-charset-normalizer 3.4.2: https://github.com/ousret/charset_normalizer : MIT License python-certifi 2024.7.4: https://certifiio.readthedocs.io/en/latest/ : Mozilla Public License 2.0 python-pluggy 1.6.0: https://pypi.python.org/pypi/pluggy : MIT License -python-typing-extensions 4.14.0 : Python Software Foundation License 2.0 +python-typing-extensions 4.14.1 : Python Software Foundation License 2.0 RonnyPfannschmidt/iniconfig 2.1.0: https://github.com/RonnyPfannschmidt/iniconfig : MIT License ruamel-yaml 0.18.6: https://pypi.org/project/ruamel.yaml/ : MIT License ruamel.yaml.clib 0.2.12: https://sourceforge.net/p/ruamel-yaml-clib/code/ci/default/tree/ : MIT License @@ -44,74 +44,18 @@ voluptuous 0.15.2: http://pypi.python.org/pypi/voluptuous : BSD 3-clause "New" o Copyright Text: -Coverage 7.9.1 pypi:coverage/7.9.1: http://nedbatchelder.com/code/modules/coverage.html - (c) - else: - c.post_fork() - self._collectors[:] = keep_collectors - - if self._collectors: - - (c) - yield code - - - (c) - else: - c.post_fork() - self._collectors[:] = keep_collectors - - if self._collectors: - - (c) - yield code - - - (c) for c in re.split(r"(\d - -def human_sorted(strings: Iterable[str]) -> list[str]: - - (c) for c in re.split(r"(\d - -def human_sorted(strings: Iterable[str]) -> list[str]: - - (c) for c in self.code) - - def add_line(self, line: str) -> None: - - (c) for c in self.code) - - def add_line(self, line: str) -> None: - - (c) for c in text - print(u"All OK with {encoding}") - encoding = "{encoding}" - """, - - (c) for c in text - source_text = source.format(encoding=encoding, text=text, ords=ords) - zf.writestr(filename, source_text.encode(encoding)) - - with zipfile.ZipFile("tests/zip1.zip", "w") as zf: - - (c)?c:a(c)):null - Copyright 2001 Gareth Rees. All rights reserved. - - Copyright 2004- - ) - - Copyright 2004-2025 Ned Batchelder. All rights reserved. - - Copyright 2004. - Copyright Software Freedom Conservancy, Inc. - +Coverage 7.9.2 pypi:coverage/7.9.2: http://nedbatchelder.com/code/modules/coverage.html + No Copyrights found exceptiongroup 1.3.0 pypi:exceptiongroup/1.3.0: https://github.com/python-trio/exceptiongroup Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, Copyright (c) 2022 Alex Gr flake8 7.3.0 pypi:flake8/7.3.0: https://gitlab.com/pycqa/flake8 - No Copyrights found + Copyright (C) 2011-2013 Tarek Ziade + + Copyright (C) 2012-2016 Ian Cordasco + gitdb 4.0.12 pypi:gitdb/4.0.12: http://github.com/gitpython-developers/gitdb (c) # end handle interpreter @@ -6099,10 +6043,10 @@ const int always_fail_option = 2; #endif // !defined(BOOST_ASIO_NOEXCEPT_OR_NOTHROW) #if !defined(BOOST_ASIO_NOEXCEPT_IF) - (c) c - (C) C + (c) c + (C) C @@ -8815,12 +8759,12 @@ Arpack has been renamed to arpack-ng. # # All rights reserved. - Copyright (C) 2001, 2002 Peter Dimov - - Copyright (c) 2001, 2002 Peter Dimov + Copyright (C) 2001, 2002 Peter Dimov + + Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. @@ -8881,12 +8825,12 @@ are met: from this software without specific prior written permission. - Copyright (C) 2001-2002 Joel de Guzman - - Copyright (c) 2001-2002 Joel de Guzman + Copyright (C) 2001-2002 Joel de Guzman + + Copyright (C) 2001-2003 @@ -9491,12 +9435,12 @@ modification, are permitted provided that the following conditions are met: Copyright (C) 2005 Douglas Gregor. - Copyright (c) 2005 Eric Niebler - - Copyright (C) 2005 Eric Niebler + Copyright (c) 2005 Eric Niebler + + Copyright (C) 2005 Igor Chesnokov, mailto:ichesnokov@gmail.com (VC 6.5,VC 7.1 @@ -9725,12 +9669,12 @@ met: Copyright (C) 2006 The Trustees of Indiana University. - Copyright (C) 2006 Tobias Schwinger - - Copyright (c) 2006 Tobias Schwinger + Copyright (C) 2006 Tobias Schwinger + + Copyright (c) 2006 Tomas Puverle @@ -11909,21 +11853,21 @@ met: Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland. - Copyright (C) 2014 Agustin Berge - - Copyright (c) 2014 Agustin Berge + Copyright (C) 2014 Agustin Berge + + Copyright (c) 2014 Ahmed Charles // - Copyright (C) 2014 Andrey Semashev - - Copyright (c) 2014 Andrey Semashev + Copyright (C) 2014 Andrey Semashev + + Copyright (c) 2014 Andrey Semashev */ @@ -12039,12 +11983,12 @@ met: // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2014, 2018, Oracle and/or its affiliates. + copyright (c) 2014, 2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2014, 2018, Oracle and/or its affiliates. + Copyright (c) 2014, 2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -12057,12 +12001,12 @@ met: // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2014, 2019, Oracle and/or its affiliates. + copyright (c) 2014, 2019, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2014, 2019, Oracle and/or its affiliates. + Copyright (c) 2014, 2019, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -12268,12 +12212,12 @@ met: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2014-2018, Oracle and/or its affiliates. + Copyright (c) 2014-2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2014-2018, Oracle and/or its affiliates. + copyright (c) 2014-2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -12463,11 +12407,11 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml Copyright (c) 2015 Muhammad Junaid Muzammil - Copyright (c) 2015 Oracle and/or its affiliates. + copyright (c) 2015 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2015 Oracle and/or its affiliates. + Copyright (c) 2015 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -12511,11 +12455,11 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2015, Oracle and/or its affiliates. + Copyright (c) 2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle - Copyright (c) 2015, Oracle and/or its affiliates. + copyright (c) 2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle @@ -12557,12 +12501,12 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml Copyright (c) 2015-2017 The MathJax Consortium - copyright (c) 2015-2017, Oracle and/or its affiliates. + Copyright (c) 2015-2017, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2015-2017, Oracle and/or its affiliates. + copyright (c) 2015-2017, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -12585,12 +12529,12 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2015-2018, Oracle and/or its affiliates. + Copyright (c) 2015-2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2015-2018, Oracle and/or its affiliates. + copyright (c) 2015-2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -12649,12 +12593,12 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2015-2020, Oracle and/or its affiliates. + Copyright (c) 2015-2020, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2015-2020, Oracle and/or its affiliates. + copyright (c) 2015-2020, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -12665,13 +12609,13 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program - Copyright (c) 2015-2020, Oracle and/or its affiliates. + copyright (c) 2015-2020, Oracle and/or its affiliates. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2015-2020, Oracle and/or its affiliates. + Copyright (c) 2015-2020, Oracle and/or its affiliates. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle @@ -12919,12 +12863,12 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2016-2020, Oracle and/or its affiliates. - - copyright (c) 2016-2020, Oracle and/or its affiliates. + Copyright (c) 2016-2020, Oracle and/or its affiliates. + + Copyright (C) 2017 @@ -13024,12 +12968,12 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml Copyright (C) 2017 Glen Joseph Fernandes (glenjofe@gmail.com) - Copyright (c) 2017 James E. King III - - Copyright (C) 2017 James E. King III + Copyright (c) 2017 James E. King III + + Copyright (c) 2017 John Maddock @@ -13045,11 +12989,11 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml Copyright (C) 2017 Michel Morin. - Copyright (c) 2017 Oracle and/or its affiliates. + copyright (c) 2017 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2017 Oracle and/or its affiliates. + Copyright (c) 2017 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -13076,12 +13020,12 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2017, Oracle and/or its affiliates. - - Copyright (c) 2017, Oracle and/or its affiliates. + copyright (c) 2017, Oracle and/or its affiliates. + + Copyright (c) 2017-2017 Barend Gehrels, Amsterdam, the Netherlands. // This file was modified by Oracle on 2020. @@ -13139,11 +13083,11 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml copyright (c) 2017-2019, Oracle and/or its affiliates. - Copyright (c) 2017-2020 Oracle and/or its affiliates. + copyright (c) 2017-2020 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2017-2020 Oracle and/or its affiliates. + Copyright (c) 2017-2020 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -13158,11 +13102,11 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library - copyright (c) 2017-2020, Oracle and/or its affiliates. + Copyright (c) 2017-2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2017-2020, Oracle and/or its affiliates. + copyright (c) 2017-2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -13176,12 +13120,12 @@ ruamel-yaml 0.18.6 pypi:ruamel.yaml/0.18.6: https://pypi.org/project/ruamel.yaml // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle. - copyright (c) 2017-2020, Oracle and/or its affiliates. - - Copyright (c) 2017-2020, Oracle and/or its affiliates. + copyright (c) 2017-2020, Oracle and/or its affiliates. + + copyright (c) 2017-2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -13318,12 +13262,12 @@ Unit tests for the dual annealing global optimizer // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle - copyright (c) 2018, Oracle and/or its affiliates. - - Copyright (c) 2018, Oracle and/or its affiliates. + copyright (c) 2018, Oracle and/or its affiliates. + + Copyright (c) 2018, Quansight-Labs All rights reserved. @@ -13404,31 +13348,31 @@ modification, are permitted provided that the following conditions are met: // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2018-2020 Oracle and/or its affiliates. - - Copyright (c) 2018-2020 Oracle and/or its affiliates. + copyright (c) 2018-2020 Oracle and/or its affiliates. + + copyright (c) 2018-2020 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library - copyright (c) 2018-2020, Oracle and/or its affiliates. - -// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2018-2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle copyright (c) 2018-2020, Oracle and/or its affiliates. +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + + Copyright (c) 2018-2020, Oracle and/or its affiliates. + // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2018-2020, Oracle and/or its affiliates. + copyright (c) 2018-2020, Oracle and/or its affiliates. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -13603,12 +13547,12 @@ For the odd-sized DCT-IV transforms: copyright (c) 2020 Oracle and/or its affiliates. - Copyright (c) 2020 Oracle and/or its affiliates. + copyright (c) 2020 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library - copyright (c) 2020 Oracle and/or its affiliates. + Copyright (c) 2020 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library @@ -13629,18 +13573,18 @@ For the odd-sized DCT-IV transforms: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2020, Oracle and/or its affiliates. - - copyright (c) 2020, Oracle and/or its affiliates. Copyright (c) 2020, Oracle and/or its affiliates. + + + copyright (c) 2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library - copyright (c) 2020, Oracle and/or its affiliates. + Copyright (c) 2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library @@ -17259,7 +17203,18 @@ psf-requests 2.32.3 pypi:requests/2.32.3: http://docs.python-requests.org copyright: (c) 2017 by Kenneth Reitz. pycodestyle 2.14.0 pypi:pycodestyle/2.14.0: https://pypi.python.org/pypi/pycodestyle - No Copyrights found + Copyright (C) 2006-2009 Johann C. Rocholl + + Copyright (C) 2009-2014 Florent Xicluna + + Copyright (C) 2014-2016 Ian Lee + + Copyright © 2006-2009 Johann C. Rocholl + + Copyright © 2009-2014 Florent Xicluna + + Copyright © 2014-2020 Ian Lee + Pyflakes 3.4.0 pypi:pyflakes/3.4.0: https://github.com/pyflakes/pyflakes Copyright 2005-2011 Divmod, Inc. @@ -17271,7 +17226,379 @@ try: Copyright 2013-2014 Florent Xicluna Pygments - Python syntax highlighter 2.19.2 pypi:Pygments/2.19.2: http://pygments.org/ - No Copyrights found + (c) + (if (> c 127) + (logxor c listify-key-sequence-1) + c))) + key))) + +(defun eventp (obj) + "True if the argument is an event object." + (when obj + (or (integerp obj) + (and (symbolp obj) obj (not (keywordp obj))) + (and (consp obj) (symbolp (car obj)))))) + + (c) + + with open(__file__, + fp.write(header) + + for cat in sorted(categories): + + (c) + if cn < (2 + # ASCII character + buf.append(str(c)) + elif (2**7) <= cn < (2**16): + + (c) + # XID_START and XID_CONTINUE are special categories used for matching + # identifiers in Python 3. + if c.isidentifier(): + + (c) + assert len(cats) == 1, " + + (c) + if ( + + (c) + if ord(c) == 0xdc00: + # Hack to avoid combining this combining with the preceding high + # surrogate, 0xdbff, when doing a repr. + c = '\\' + c + + (c) & 0xFFFFFF); + } + + (c) (declare (ignore c)) nil) +) + + (c) * F; + F := F * B; + end; +end; + +function KeepIn(i, Bottom, Top: Variant): Variant; +begin + Result := i; + if Result > Top then + Result := Top + else if Result < Bottom then + Result := Bottom; +end; + + (c) 2006-2024 by Georg Brandl, Matth + 'Chajdas and contributors.') + return 0 + + def is_only_option(opt): + + (C) Copyright ..." is shown in the HTML footer. Default is True. + + (C) Copyright 2006 Salvatore Filippone University of Rome Tor Vergata +!!$ Alfredo Buttari University of Rome Tor Vergata +!!$ Daniela Di Serafino II University of Naples +!!$ Pasqua D'Ambra ICAR-CNR +!!$ +!!$ Redistribution and use in source and binary forms, with or without +!!$ modification, are permitted provided that the following conditions +!!$ are met: +!!$ 1. Redistributions of source code must retain the above copyright +!!$ notice, this list of conditions and the following disclaimer. +!!$ 2. Redistributions in binary form must reproduce the above copyright +!!$ notice, this list of conditions, and the following disclaimer in the +!!$ documentation and/or other materials provided with the distribution. + + (C) FSF. +;;; See the file `COPYING' for terms applying to this program. +;;; + + (c) in (0x2d, 0x5b, 0x5c, 0x5d, 0x5e): + # Escape regex metachars. + c = '\\' + c + + (c) of + '0'..'9': c := c - 48; + 'A'..'Z': c := c - 55; + end; + if c < B then + + copyright : (C) 2004 by Andr + email : andre.simon1@gmx.de + ***************************************************************************/ + + copyright : (C) 2004 by Andre Simon + email : andre.simon1@gmx.de + ***************************************************************************/ + + copyright Copyright (c) 2006, Manni + * @version 1.0 + * @link http://www.pkware.com/business_and_developers/developer/popups/appnote.txt + * @link http://mannithedark.is-a-geek.net/ + * @since 1.0 + * @package fnord.bb + * @subpackage archive + */ +class Zip extends Archive { + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + Copyright (C) 1985-1986, 1992, 1994-1995, 1999-2015 Free Software +;; Foundation, Inc. + +;; Maintainer: emacs-devel@gnu.org +;; Keywords: internal +;; Package: emacs + + Copyright (C) 1993-2003 Yukihiro Matsumoto + + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 + + Copyright (c) 1997 Borland International +{ } + + Copyright (c) 1998,1999,2000,2001,2002 Tal Davidson. All rights reserved. + * + * ASBeautifier.cpp + * by Tal Davidson (davidsont@bigfoot.com) + * This file is a part of "Artistic Style" - an indentater and reformatter + * of C, C, C# and Java source files. + + Copyright (c) 1998,1999,2000,2001,2002 Tal Davidson. All rights reserved. + * + * ASFormatter.cpp + * by Tal Davidson (davidsont@bigfoot.com) + * This file is a part of "Artistic Style" - an indentater and reformatter + * of C, C++, C# and Java source files. + + Copyright (c) 1998,1999,2000,2001,2002 Tal Davidson. All rights reserved. + * + * compiler_defines.h (1 January 1999) + * by Tal Davidson (davidsont@bigfoot.com) + * This file is a part of "Artistic Style" - an indentater and reformatter + * of C, C++, C# and Java source files. + + Copyright (C) 2000 Information-technology Promotion Agency, Japan + + + Copyright (C) 2000 Network Applied Communication Laboratory, Inc. + + Copyright (C) 2004, 2005, 2006 Aelitis, All Rights Reserved. + + Copyright (C) 2005 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit $? + ;; + + Copyright (c) 2005-2006 by: // +// // +// Authors: // +// Michael Dominic K. // + + Copyright (c) 2006-2022 by the respective authors (see AUTHORS file). +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + + Copyright (c) 2008 Silken Web - Free BSD License +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +' * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer +' * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +' * Neither the name of Silken Web nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +' + + Copyright (C) 2008 Slava Pestov + + Copyright (C) 2009 Benjamin Kowarsch. All rights reserved. + + Copyright (c) 2014 Fullstack.io. All rights reserved. +// + + Copyright (c) 2015 Georg Brandl + + Copyright (c) Curve.Fi, 2020-2023 - all rights reserved +@notice Stableswap implementation for up to 8 coins with no rehypothecation, + i.e. the AMM does not deposit tokens into other contracts. The Pool contract also + records exponential moving averages for coins relative to coin 0. +@dev Asset Types: + + Copyright (c) Rich Hickey. All rights reserved. + + Copyright 1996 Institut National de Recherche en Informatique et + + Copyright 2005 Brian Alliet + +\documentclass[11pt]{article} +\usepackage{palatino} +\usepackage{fullpage} +\usepackage{parskip} +\usepackage{lhs} + + Copyright 2006-2025 by the Pygments team. + + copyright 2006. + Uploaded to HaskellWiki as DancingSudoku.lhs + + I compile on a powerbook G4 (Mac OS X, ghc 6.4.2) using + ghc -optc-O3 -funbox-strict-fields -O2 --make -fglasgow-exts + + Copyright 2012 by Luis Majano and Ortus Solutions, Corp + + Copyright 2012 Nokia Siemens Networks Oyj + + copyright = '2006-2024, Georg Brandl and Pygments contributors + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. + + copyright = llist + + copyright = llist + while copyright and copyright_2_re.match(copyright[0]): + + copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + + copyright info" + + + copyright or not copyright_re.match(copyright + + Copyright Since + + copyright' : '\U000000a9 + '\\textregistered' : '\U000000ae', + '\\textonequarter' : '\U000000bc', + '\\textonehalf' : '\U000000bd', + '\\textthreequarters' : '\U000000be', + '\\textordfeminine' : '\U000000aa', + '\\textordmasculine' : '\U000000ba', + '\\euro' : '\U000020ac', + '\\pounds' : '\U000000a3', + '\\yen' : '\U000000a5', + '\\textcent' : '\U000000a2', + '\\textcurrency' : '\U000000a4', + '\\textdegree' : '\U000000b0', + } + + copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. + + copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. + + copyright: Copyright 2006-2025 by + r'the Pygments team, see AUTHORS\.$') +copyright_2_re = re.compile(rf'^ {name_mail_re}(, {name_mail_re})*[,.]$') +is_const_re = re.compile(r'if.*?==\s+(None|False|True)\b') + +misspellings = ["developement", "adress", "verificate", # ALLOW-MISSPELLING + "informations", "unlexer"] # ALLOW-MISSPELLING + + copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + + copyright: Copyright 2021 by the Pygments team, see AUTHORS. + + Copyright:: Copyright (c) 2003, 04 by Johannes Barre + + copyright>' : '\U000000a9 + '\\' : '\U000000ae', + '\\' : '\U000000ad', + '\\' : '\U000000af', + '\\' : '\U000000bc', + '\\' : '\U000000bd', + '\\' : '\U000000be', + '\\' : '\U000000aa', + '\\' : '\U000000ba', + '\\
' : '\U000000a7', + '\\' : '\U000000b6', + '\\' : '\U000000a1', + '\\' : '\U000000bf', + '\\' : '\U000020ac', + '\\' : '\U000000a3', + '\\' : '\U000000a5', + '\\' : '\U000000a2', + '\\' : '\U000000a4', + '\\' : '\U000000b0', + '\\' : '\U00002a3f', + '\\' : '\U00002127', + '\\' : '\U000025ca', + '\\' : '\U00002118', + '\\' : '\U00002240', + '\\' : '\U000022c4', + '\\' : '\U000000b4', + '\\' : '\U00000131', + '\\' : '\U000000a8', + '\\' : '\U000000b8', + '\\' : '\U000002dd', + '\\' : '\U000003f5', + '\\' : '\U000023ce', + '\\' : '\U00002039', + '\\' : '\U0000203a', + '\\' : '\U00002302', + '\\<^sub>' : '\U000021e9', + '\\<^sup>' : '\U000021e7', + '\\<^bold>' : '\U00002759', + '\\<^bsub>' : '\U000021d8', + '\\<^esub>' : '\U000021d9', + '\\<^bsup>' : '\U000021d7', + '\\<^esup>' : '\U000021d6', + } + + Copyright|VersionDescription + r'VersionNumber|VersionProduct|VersionTrademarks|Version|' + r'VFPXMLProgID|ViewPortHeight|ViewPortLeft|' + r'ViewPortTop|ViewPortWidth|VScrollSmallChange|View|Visible|' + r'VisualEffect|WhatsThisButton|WhatsThisHelpID|WhatsThisHelp|' + r'WhereType|Width|WindowList|WindowState|WindowType|WordWrap|' + r'WrapCharInCDATA|WrapInCDATA|WrapMemoInCDATA|XMLAdapter|' + r'XMLConstraints|XMLNameIsXPath|XMLNamespace|XMLName|' + r'XMLPrefix|XMLSchemaLocation|XMLTable|XMLType|' + r'XSDfractionDigits|XSDmaxLength|XSDtotalDigits|' + r'XSDtype|ZoomBox)', Name.Attribute), + + (r'\.(ActivateCell|AddColumn|AddItem|AddListItem|AddObject|' + r'AddProperty|AddTableSchema|AddToSCC|Add|' + r'ApplyDiffgram|Attach|AutoFit|AutoOpen|Box|Build|' + r'CancelReport|ChangesToCursor|CheckIn|CheckOut|Circle|' + r'CleanUp|ClearData|ClearStatus|Clear|CloneObject|CloseTables|' + r'Close|Cls|CursorAttach|CursorDetach|CursorFill|' + r'CursorRefresh|DataToClip|DelayedMemoFetch|DeleteColumn|' + r'Dock|DoMessage|DoScroll|DoStatus|DoVerb|Drag|Draw|Eval|' + r'GetData|GetDockState|GetFormat|GetKey|GetLatestVersion|' + r'GetPageHeight|GetPageWidth|Help|Hide|IncludePageInOutput|' + r'IndexToItemID|ItemIDToIndex|Item|LoadXML|Line|Modify|' + r'MoveItem|Move|Nest|OLEDrag|OnPreviewClose|OutputPage|' + r'Point|Print|PSet|Quit|ReadExpression|ReadMethod|' + r'RecordRefresh|Refresh|ReleaseXML|Release|RemoveFromSCC|' + r'RemoveItem|RemoveListItem|RemoveObject|Remove|' + r'Render|Requery|RequestData|ResetToDefault|Reset|Run|' + r'SaveAsClass|SaveAs|SetAll|SetData|SetFocus|SetFormat|' + r'SetMain|SetVar|SetViewPort|ShowWhatsThis|Show|' + r'SupportsListenerType|TextHeight|TextWidth|ToCursor|' + r'ToXML|UndoCheckOut|Unnest|UpdateStatus|WhatsThisMode|' + r'WriteExpression|WriteMethod|ZOrder)', Name.Function), + pypi/setuptools 59.6.0 pypi:setuptools/59.6.0: https://pypi.org/project/setuptools/ (c) *output } @@ -17333,7 +17660,38 @@ pypi/setuptools 59.6.0 pypi:setuptools/59.6.0: https://pypi.org/project/setuptoo Copyright Jason R. Coombs pytest 8.4.1 pypi:pytest/8.4.1: http://pytest.org - No Copyrights found + (c) + + # ASCII fast path. + if 0x20 <= o < 0x07F: + + (c) + + # Control characters. + if category == "Cc": + + (C) + + assert all_marks == + + assert get_unpacked_marks(C, consider_mro=False) == [xfail("c").mark] + + (c) + if wc < 0: + return -1 + width += wc + + (c) in ("F", "W"): + return 2 + + return 1 + + Copyright (c) 2004 Holger Krekel and others + + Copyright (c) 2014, Gregory Boissinot + + Copyright Holger Krekel and others, 2004. + python3-charset-normalizer 3.4.2 pypi:charset-normalizer/3.4.2: https://github.com/ousret/charset_normalizer (c) https://stackoverflow.com/questions/3041986/apt-command-line-interface-like-yes-no-input """ @@ -17371,50 +17729,8 @@ python-certifi 2024.7.4 pypi:certifi/2024.7.4: https://certifiio.readthedocs.io/ python-pluggy 1.6.0 pypi:pluggy/1.6.0: https://pypi.python.org/pypi/pluggy Copyright (c) 2015 holger krekel (rather uses bitbucket/hpk42) -python-typing-extensions 4.14.0 pypi:typing-extensions/4.14.0 - (C) - - with self.assertRaisesRegex(TypeError, non_callable_members_illegal): - issubclass(C, PNonCall) - - self.assertIsInstance(C(), PNonCall) - - (C) - P.register(C) - self.assertIsInstance(C(), P) - self.assertIsInstance(C(), D) - - def test_none_on_non_callable_doesnt_block_implementation(self): - - (C) - self.assertIsSubclass(C, A) - self.assertNotIsSubclass(C, B) - - class D: ... - B.register(D) - self.assertIsSubclass(D, A) - self.assertIsSubclass(D, B) - - (C) - self.assertIsSubclass(C, D) - self.assertIsInstance(C(), D) - - with self.assertRaisesRegex(TypeError, non_callable_members_illegal): - - Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, -The Netherlands. All rights reserved. - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Stichting Mathematisch -Centrum or CWI not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - - Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, - +python-typing-extensions 4.14.1 pypi:typing-extensions/4.14.1 + No Copyrights found RonnyPfannschmidt/iniconfig 2.1.0 pypi:iniconfig/2.1.0: https://github.com/RonnyPfannschmidt/iniconfig (C) Ronny Pfannschmidt, Holger Krekel -- MIT licensed """ @@ -19626,11 +19942,11 @@ const int always_fail_option = 2; #if !defined(BOOST_ASIO_NOEXCEPT_IF) # if defined(BOOST_ASIO_HAS_NOEXCEPT) - (C) C - (c) c (C) C + + (C) C #endif @@ -22040,10 +22356,10 @@ Arpack has been renamed to arpack-ng. # # All rights reserved. - Copyright (C) 2001, 2002 Peter Dimov - Copyright (c) 2001, 2002 Peter Dimov + Copyright (C) 2001, 2002 Peter Dimov + Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. Copyright (c) 2001, 2002 Python Software Foundation; All Rights @@ -22091,10 +22407,10 @@ are met: from this software without specific prior written permission. - Copyright (C) 2001-2002 Joel de Guzman - Copyright (c) 2001-2002 Joel de Guzman + Copyright (C) 2001-2002 Joel de Guzman + Copyright (C) 2001-2003 Copyright (C) 2001-2003 @@ -22523,10 +22839,10 @@ modification, are permitted provided that the following conditions are met: Copyright (C) 2005 Douglas Gregor. - Copyright (c) 2005 Eric Niebler - Copyright (C) 2005 Eric Niebler + Copyright (c) 2005 Eric Niebler + Copyright (C) 2005 Igor Chesnokov, mailto:ichesnokov@gmail.com (VC 6.5,VC 7.1 Copyright (c) 2005 Matthew Calabrese @@ -22661,10 +22977,10 @@ met: Copyright (C) 2006 The Trustees of Indiana University. - Copyright (C) 2006 Tobias Schwinger - Copyright (c) 2006 Tobias Schwinger + Copyright (C) 2006 Tobias Schwinger + Copyright (c) 2006 Tomas Puverle Copyright (C) 2006 Trustees of Indiana University @@ -24339,17 +24655,17 @@ are permitted provided that the following conditions are met: // This file was modified by Oracle on 2020. - Copyright (c) 2014 Agustin Berge - Copyright (C) 2014 Agustin Berge + Copyright (c) 2014 Agustin Berge + Copyright (c) 2014 Ahmed Charles // - Copyright (C) 2014 Andrey Semashev - Copyright (c) 2014 Andrey Semashev + Copyright (C) 2014 Andrey Semashev + Copyright (c) 2014 Andrey Semashev */ @@ -24439,12 +24755,12 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2014, 2018, Oracle and/or its affiliates. + copyright (c) 2014, 2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2014, 2018, Oracle and/or its affiliates. + Copyright (c) 2014, 2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -24457,12 +24773,12 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2014, 2019, Oracle and/or its affiliates. + copyright (c) 2014, 2019, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2014, 2019, Oracle and/or its affiliates. + Copyright (c) 2014, 2019, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -24480,11 +24796,11 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2014, Oracle and/or its affiliates. + Copyright (c) 2014, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle - Copyright (c) 2014, Oracle and/or its affiliates. + copyright (c) 2014, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle @@ -24633,11 +24949,11 @@ are permitted provided that the following conditions are met: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library - Copyright (c) 2014-2018 Oracle and/or its affiliates. + copyright (c) 2014-2018 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2014-2018 Oracle and/or its affiliates. + Copyright (c) 2014-2018 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -24653,12 +24969,12 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2014-2018, Oracle and/or its affiliates. + Copyright (c) 2014-2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2014-2018, Oracle and/or its affiliates. + copyright (c) 2014-2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -24732,11 +25048,11 @@ are permitted provided that the following conditions are met: Copyright (c) 2014-2020, Oracle and/or its affiliates. - copyright (c) 2014-2020, Oracle and/or its affiliates. + Copyright (c) 2014-2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2014-2020, Oracle and/or its affiliates. + copyright (c) 2014-2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -24744,12 +25060,12 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle - copyright (c) 2014-2020, Oracle and/or its affiliates. + Copyright (c) 2014-2020, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2014-2020, Oracle and/or its affiliates. + copyright (c) 2014-2020, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -24821,11 +25137,11 @@ are permitted provided that the following conditions are met: Copyright (c) 2015 Muhammad Junaid Muzammil - copyright (c) 2015 Oracle and/or its affiliates. + Copyright (c) 2015 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2015 Oracle and/or its affiliates. + copyright (c) 2015 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -24863,11 +25179,11 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2015, Oracle and/or its affiliates. + Copyright (c) 2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle - Copyright (c) 2015, Oracle and/or its affiliates. + copyright (c) 2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle @@ -24905,12 +25221,12 @@ are permitted provided that the following conditions are met: Copyright (c) 2015-2017 The MathJax Consortium - Copyright (c) 2015-2017, Oracle and/or its affiliates. + copyright (c) 2015-2017, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2015-2017, Oracle and/or its affiliates. + Copyright (c) 2015-2017, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -24932,12 +25248,12 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2015-2018, Oracle and/or its affiliates. + copyright (c) 2015-2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2015-2018, Oracle and/or its affiliates. + Copyright (c) 2015-2018, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -24980,29 +25296,29 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle - copyright (c) 2015-2020 Oracle and/or its affiliates. - -// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle -// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2015-2020 Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2015-2020, Oracle and/or its affiliates. - - Copyright (c) 2015-2020, Oracle and/or its affiliates. - -// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - - copyright (c) 2015-2020, Oracle and/or its affiliates. + copyright (c) 2015-2020 Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + copyright (c) 2015-2020, Oracle and/or its affiliates. + Copyright (c) 2015-2020, Oracle and/or its affiliates. +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + + Copyright (c) 2015-2020, Oracle and/or its affiliates. + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + + copyright (c) 2015-2020, Oracle and/or its affiliates. + // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -25012,13 +25328,13 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program - Copyright (c) 2015-2020, Oracle and/or its affiliates. + copyright (c) 2015-2020, Oracle and/or its affiliates. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2015-2020, Oracle and/or its affiliates. + Copyright (c) 2015-2020, Oracle and/or its affiliates. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle @@ -25198,20 +25514,20 @@ are permitted provided that the following conditions are met: Copyright (c) 2016-2020 Antony Polukhin // - Copyright (c) 2016-2020 Oracle and/or its affiliates. - copyright (c) 2016-2020 Oracle and/or its affiliates. Copyright (c) 2016-2020 Oracle and/or its affiliates. + + Copyright (c) 2016-2020 Oracle and/or its affiliates. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2016-2020, Oracle and/or its affiliates. - Copyright (c) 2016-2020, Oracle and/or its affiliates. copyright (c) 2016-2020, Oracle and/or its affiliates. + + copyright (c) 2016-2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -25309,10 +25625,10 @@ are permitted provided that the following conditions are met: Copyright (C) 2017 Glen Joseph Fernandes (glenjofe@gmail.com) - Copyright (c) 2017 James E. King III - Copyright (C) 2017 James E. King III + Copyright (c) 2017 James E. King III + Copyright (c) 2017 John Maddock Copyright (c) 2017 Klemens D. Morgenstern @@ -25325,11 +25641,11 @@ are permitted provided that the following conditions are met: copyright (c) 2017 Oracle and/or its affiliates. - Copyright (c) 2017 Oracle and/or its affiliates. + copyright (c) 2017 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2017 Oracle and/or its affiliates. + Copyright (c) 2017 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -25349,10 +25665,10 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2017, Oracle and/or its affiliates. - Copyright (c) 2017, Oracle and/or its affiliates. + copyright (c) 2017, Oracle and/or its affiliates. + Copyright (c) 2017-2017 Barend Gehrels, Amsterdam, the Netherlands. Copyright (c) 2017-2017 Barend Gehrels, Amsterdam, the Netherlands. @@ -25378,11 +25694,11 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2017-2018, Oracle and/or its affiliates. - copyright (c) 2017-2018, Oracle and/or its affiliates. Copyright (c) 2017-2018, Oracle and/or its affiliates. + + Copyright (c) 2017-2018, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -25403,15 +25719,15 @@ are permitted provided that the following conditions are met: // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2017-2020 Oracle and/or its affiliates. - copyright (c) 2017-2020 Oracle and/or its affiliates. Copyright (c) 2017-2020 Oracle and/or its affiliates. + + copyright (c) 2017-2020 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2017-2020 Oracle and/or its affiliates. + Copyright (c) 2017-2020 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -25420,15 +25736,15 @@ are permitted provided that the following conditions are met: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library + copyright (c) 2017-2020, Oracle and/or its affiliates. + Copyright (c) 2017-2020, Oracle and/or its affiliates. - copyright (c) 2017-2020, Oracle and/or its affiliates. - - copyright (c) 2017-2020, Oracle and/or its affiliates. + Copyright (c) 2017-2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2017-2020, Oracle and/or its affiliates. + copyright (c) 2017-2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -25548,10 +25864,10 @@ Unit tests for the dual annealing global optimizer Copyright (c) 2018, Cem Bassoy, cem.bassoy@gmail.com - Copyright (c) 2018, Oracle and/or its affiliates. - copyright (c) 2018, Oracle and/or its affiliates. + Copyright (c) 2018, Oracle and/or its affiliates. + copyright (c) 2018, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -25615,19 +25931,19 @@ modification, are permitted provided that the following conditions are met: Copyright (c) 2018-2019, Cem Bassoy, cem.bassoy@gmail.com - copyright (c) 2018-2019, Oracle and/or its affiliates. - Copyright (c) 2018-2019, Oracle and/or its affiliates. + copyright (c) 2018-2019, Oracle and/or its affiliates. + Copyright (c) 2018-2020 Antony Polukhin Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc. - copyright (c) 2018-2020 Oracle and/or its affiliates. - Copyright (c) 2018-2020 Oracle and/or its affiliates. copyright (c) 2018-2020 Oracle and/or its affiliates. + + copyright (c) 2018-2020 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -25641,13 +25957,9 @@ modification, are permitted provided that the following conditions are met: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library - copyright (c) 2018-2020, Oracle and/or its affiliates. - Copyright (c) 2018-2020, Oracle and/or its affiliates. copyright (c) 2018-2020, Oracle and/or its affiliates. - -// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle Copyright (c) 2018-2020, Oracle and/or its affiliates. @@ -25655,10 +25967,14 @@ modification, are permitted provided that the following conditions are met: copyright (c) 2018-2020, Oracle and/or its affiliates. +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + + Copyright (c) 2018-2020, Oracle and/or its affiliates. + // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - Copyright (c) 2018-2020, Oracle and/or its affiliates. + copyright (c) 2018-2020, Oracle and/or its affiliates. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -25789,12 +26105,12 @@ For the odd-sized DCT-IV transforms: copyright (c) 2020 Oracle and/or its affiliates. - Copyright (c) 2020 Oracle and/or its affiliates. + copyright (c) 2020 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library - copyright (c) 2020 Oracle and/or its affiliates. + Copyright (c) 2020 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library @@ -25805,20 +26121,20 @@ For the odd-sized DCT-IV transforms: Copyright (c) 2020, Debabrata Mandal - copyright (c) 2020, Oracle and/or its affiliates. - Copyright (c) 2020, Oracle and/or its affiliates. + copyright (c) 2020, Oracle and/or its affiliates. + Copyright (c) 2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - copyright (c) 2020, Oracle and/or its affiliates. + Copyright (c) 2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library - Copyright (c) 2020, Oracle and/or its affiliates. + copyright (c) 2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library @@ -27772,10 +28088,10 @@ package originally developed by Stephen G. Nash in Fortran. copyright Louis Dionne 2013-2016 - Copyright Louis Dionne 2013-2017 - copyright Louis Dionne 2013-2017 + Copyright Louis Dionne 2013-2017 + copyright Louis Dionne 2016 Copyright Marco Guazzone 2014 @@ -28280,7 +28596,7 @@ modification, are permitted provided that the following conditions are met: Licenses: Apache License 2.0 -(Coverage 7.9.1, Packaging 25.0, pbr 6.1.1, powertrain-build 1.5.0, psf-requests 2.32.3) +(Coverage 7.9.2, Packaging 25.0, pbr 6.1.1, powertrain-build 1.5.0, psf-requests 2.32.3) Apache License Version 2.0, January 2004 @@ -29025,7 +29341,7 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice --- Python Software Foundation License 2.0 -(python-typing-extensions 4.14.0) +(python-typing-extensions 4.14.1) This license was approved as the official PSF License Version 2 on October 22, 2004. The only differences between this and version 1 of the PSF license consist diff --git a/powertrain_build/build.py b/powertrain_build/build.py index 1a65a0e..61b4e18 100644 --- a/powertrain_build/build.py +++ b/powertrain_build/build.py @@ -283,7 +283,7 @@ def generate_core_dummy(build_cfg, core, unit_cfg): LOG.info("Finished generating Core Dummy (in %4.2f s)", time.time() - start_time) -def generate_ext_var(build_cfg, unit_cfg, signal_if, udt, asil_level_db, asil_level_dep, debug_code=True): +def generate_external_var(build_cfg, unit_cfg, udt, asil_level_dep, nrm_dict, dep_dict, sec_dict): """Generate two c-files that define the signal interface to the supplier. The VcExtVar function assigns all variables to the CVC_DISP memory area, @@ -296,28 +296,13 @@ def generate_ext_var(build_cfg, unit_cfg, signal_if, udt, asil_level_db, asil_le Args: build_cfg (BuildProjConfig): Build project class holding where files should be stored. - signal_if (SignalInterfaces): class holding signal interface information. + unit_cfg (UnitConfigs) : Aggregated unit configs class. udt (UserDefinedTypes): Class holding user defined data types. - asil_level_db (str): ASIL level for debug variables. - asil_level_dep (str): ASIL level for dependability variables. - debug_code (boolean): If true, generate debug code. + asil_level_dep (str): ASIL level for the dependability variables. + nrm_dict (dict): Dictionary with normal variables. + dep_dict (dict): Dictionary with dependability variables. + sec_dict (dict): Dictionary with secure variables. """ - LOG.info("******************************************************") - LOG.info("Start generating VcExtVar and VcDebug") - start_time = time.time() - nrm_dict, dep_dict, sec_dict, dbg_dict = signal_if.get_external_io() - _extract_external_var(build_cfg, unit_cfg, udt, asil_level_dep, nrm_dict, dep_dict, sec_dict) - if debug_code: - _extract_debug(build_cfg, unit_cfg, asil_level_db, dep_dict, dbg_dict) - LOG.info( - "Finished generating VcExtVar and VcDebug (in %4.2f s)", - time.time() - start_time, - ) - - -def _extract_external_var( - build_cfg, unit_cfg, udt, asil_level_dep, nrm_dict, dep_dict, sec_dict -): if build_cfg.has_yaml_interface: ext_var_nrm = ExtVarYaml(nrm_dict, build_cfg, unit_cfg, udt) ext_var_dep = ExtVarYaml(dep_dict, build_cfg, unit_cfg, udt, asil_level_dep) @@ -339,19 +324,6 @@ def _extract_external_var( instance.generate_files(ext_var_path) -def _extract_debug(build_cfg, unit_cfg, asil_level_db, dep_dict, dbg_dict): - dbg_instances = { - ExtDbg(dbg_dict, build_cfg, unit_cfg): ("VcDebug", "VcDebugOutput"), - ExtDbg(dep_dict, build_cfg, unit_cfg, asil_level_db): ("VcDebugSafe", "VcDebugOutputSafe") - } - - for instance, dir_names in dbg_instances.items(): - instance.gen_dbg_files( - pjoin(build_cfg.get_src_code_dst_dir(), dir_names[0]), - pjoin(build_cfg.get_src_code_dst_dir(), dir_names[1]), - ) - - def generate_dummy_var(build_cfg, unit_cfg, signal_if, udt): """Generate c-file that define the missing signals. @@ -806,14 +778,30 @@ def build( if interface: interface_report(build_cfg, unit_cfg, signal_if) - generate_ext_var( - build_cfg, - unit_cfg, - signal_if, - udt, - build_defs.CVC_ASIL_LEVEL_MAP[code_generation_config["generalAsilLevelDebug"]], - build_defs.ASIL_LEVEL_MAP[code_generation_config["generalAsilLevelDependability"]] - ) + LOG.info("******************************************************") + LOG.info("Start generating VcExtVar and VcDebug") + start_time = time.time() + asil_level_db = build_defs.CVC_ASIL_LEVEL_MAP[code_generation_config["generalAsilLevelDebug"]] + asil_level_dep = build_defs.ASIL_LEVEL_MAP[code_generation_config["generalAsilLevelDependability"]] + nrm_dict, dep_dict, sec_dict, dbg_dict = signal_if.get_external_io() + + generate_external_var(build_cfg, unit_cfg, udt, asil_level_dep, nrm_dict, dep_dict, sec_dict) + + restructured_dbg_dict = {} + dbg_instances = { + ExtDbg(dbg_dict, build_cfg, unit_cfg): ("VcDebug", "VcDebugOutput"), + ExtDbg(dep_dict, build_cfg, unit_cfg, asil_level_db): ("VcDebugSafe", "VcDebugOutputSafe") + } + for instance, dir_names in dbg_instances.items(): + restructured_dbg_dict.update({ + dir_names[0]: instance.dbg_dict["inputs"], + dir_names[1]: instance.dbg_dict["outputs"] + }) + instance.gen_dbg_files( + pjoin(build_cfg.get_src_code_dst_dir(), dir_names[0]), + pjoin(build_cfg.get_src_code_dst_dir(), dir_names[1]) + ) + LOG.info("Finished generating VcExtVar and VcDebug (in %4.2f s)", time.time() - start_time) if not code_generation_config["generateDummyVar"]: LOG.info("******************************************************") @@ -848,19 +836,15 @@ def build( LOG.info("******************************************************") LOG.info("Start generating the scheduling functions") start_time = time.time() - gen_schd = SchedFuncs(build_cfg, unit_cfg) + gen_schd = SchedFuncs(build_cfg, unit_cfg, restructured_dbg_dict) gen_schd.generate_sched_c_fncs(generate_rte_checkpoint_calls) - LOG.info( - "Finished generating the scheduling functions (in %4.2f s)", - time.time() - start_time, - ) + LOG.info("Finished generating the scheduling functions (in %4.2f s)", time.time() - start_time) + LOG.info("******************************************************") LOG.info("Start generating the ts header file") start_time = time.time() gen_schd.generate_ts_defines(pjoin(src_dst_dir, build_cfg.get_ts_header_name())) - LOG.info( - "Finished generating ts header file (in %4.2f s)", time.time() - start_time - ) + LOG.info("Finished generating ts header file (in %4.2f s)", time.time() - start_time) # Generate AllSystemInfo.mat for DocGen compatibility if generate_system_info: diff --git a/powertrain_build/ext_dbg.py b/powertrain_build/ext_dbg.py index 74269e0..8ac376e 100644 --- a/powertrain_build/ext_dbg.py +++ b/powertrain_build/ext_dbg.py @@ -65,11 +65,27 @@ class ExtDbg(ProblemLogger): """ super().__init__() self.set_integrity_level(integrity_level) - self._var_dict = variable_dict - self.__restructured_data = self._restruct_data() self._prj_cfg = prj_cfg self._unit_cfg = unit_cfg - self.use_volatile_globals = prj_cfg.get_use_volatile_globals() + self._use_volatile_globals = prj_cfg.get_use_volatile_globals() + self.dbg_dict = self._restruct_data(variable_dict) + + @staticmethod + def _restruct_data(variable_dict): + """Restructure input variables per data-type. + + This will be used for declaring the variables and generating the A2L-file. + """ + data = {'outputs': {}, 'inputs': {}} + for inp in variable_dict.keys(): + if re.match(r'.*Output$', inp) is not None: + iotype = 'outputs' + else: + iotype = 'inputs' + for var, var_data in variable_dict[inp].items(): + data_type_size = byte_size_string(var_data['type']) + data[iotype].setdefault(data_type_size, {})[var] = var_data + return data def set_integrity_level(self, integrity_level): """Set integrity level of code generation. @@ -84,22 +100,6 @@ class ExtDbg(ProblemLogger): self._code_start = integrity_level['CODE']['START'] self._code_end = integrity_level['CODE']['END'] - def _restruct_data(self): - """Restructure input variables per data-type. - - This will be used for declaring the variables and generating the A2L-file. - """ - data = {'outputs': {}, 'inputs': {}} - for inp in self._var_dict.keys(): - if re.match(r'.*Output$', inp) is not None: - iotype = 'outputs' - else: - iotype = 'inputs' - for var, var_data in self._var_dict[inp].items(): - data_type_size = byte_size_string(var_data['type']) - data[iotype].setdefault(data_type_size, {})[var] = var_data - return data - def _a2l_dict(self, var_dict, function): """Generate dict defining parameters for a2l-generation.""" def _range(data): @@ -197,7 +197,7 @@ class ExtDbg(ProblemLogger): fh_c.write('\n/* Debug values */\n\n') for var, var_data in self._type_order_iterator(data): initial_value = var_data['min'] if var_data['min'] != "-" and float(var_data['min']) > 0 else "0" - if self.use_volatile_globals: + if self._use_volatile_globals: fh_c.write(f"volatile {var_data['type']} c{var[1:]}_db = {initial_value};\n") else: fh_c.write(f"{var_data['type']} c{var[1:]}_db = {initial_value};\n") @@ -205,7 +205,7 @@ class ExtDbg(ProblemLogger): fh_c.write('\n/* Debug switches */\n\n') for var, var_data in self._type_order_iterator(data): sw_name = self._var_name_to_dbgsw_name(var) - if self.use_volatile_globals: + if self._use_volatile_globals: fh_c.write(f"volatile Bool {sw_name} = 0;\n") else: fh_c.write(f"Bool {sw_name} = 0;\n") @@ -226,24 +226,30 @@ class ExtDbg(ProblemLogger): fh_c.write(f'}}\n#include "{self._code_end}"\n\n') self.info('Generated %s', filename) - def gen_dbg_files(self, fname_in, fname_out): + def gen_dbg_files(self, file_path_inputs, file_path_outputs): """Generate the c-files and A2L-files. These declares all the supplier interface debug parameters and functions. + + Args: + file_path_inputs (str): path to the debug inputs c-file. + file_path_outputs (str): path to the debug outputs c-file. """ - # c-files - self._gen_dbg_c_file(self.__restructured_data['inputs'], - fname_in + '.c') - self._gen_dbg_c_file(self.__restructured_data['outputs'], - fname_out + '.c') - # A2L-files - _, fname_tmp = os.path.split(fname_in) - a2l_dict_in = self._a2l_dict(self.__restructured_data['inputs'], - fname_tmp) - _, fname_tmp = os.path.split(fname_out) - a2l_dict_out = self._a2l_dict(self.__restructured_data['outputs'], - fname_tmp) - a2l = A2l(a2l_dict_in, self._prj_cfg) - a2l.gen_a2l(fname_in + '.a2l') - a2l = A2l(a2l_dict_out, self._prj_cfg) - a2l.gen_a2l(fname_out + '.a2l') + _, file_name_inputs = os.path.split(file_path_inputs) + _, file_name_outputs = os.path.split(file_path_outputs) + + if not self.dbg_dict['inputs']: + self.info(f"Skipping {file_name_inputs} as there were no corresponding vars.") + else: + self._gen_dbg_c_file(self.dbg_dict['inputs'], file_path_inputs + '.c') + a2l_dict_in = self._a2l_dict(self.dbg_dict['inputs'], file_name_inputs) + a2l = A2l(a2l_dict_in, self._prj_cfg) + a2l.gen_a2l(file_path_inputs + '.a2l') + + if not self.dbg_dict['outputs']: + self.info(f"Skipping {file_name_outputs} as there were no corresponding vars.") + else: + self._gen_dbg_c_file(self.dbg_dict['outputs'], file_path_outputs + '.c') + a2l_dict_out = self._a2l_dict(self.dbg_dict['outputs'], file_name_outputs) + a2l = A2l(a2l_dict_out, self._prj_cfg) + a2l.gen_a2l(file_path_outputs + '.a2l') diff --git a/powertrain_build/sched_funcs.py b/powertrain_build/sched_funcs.py index 9ec1585..6294375 100644 --- a/powertrain_build/sched_funcs.py +++ b/powertrain_build/sched_funcs.py @@ -26,18 +26,20 @@ class SchedFuncs(ProblemLogger): # Not included in VcExtINI.c and VcUnitTsDefines.h. RESTART_FNC_EXCLUDE = ('VcDebug', 'VcDebugOutput', 'VcDebugSafe', 'VcDebugOutputSafe') - def __init__(self, build_proj_cfg, unit_cfg): + def __init__(self, build_proj_cfg, unit_cfg, dbg_dict): """Constructor. Args: build_proj_cfg (BuildProjConfig): project configuration. unit_cfg (UnitConfigs): Class holding all unit interfaces. + dbg_dict (dict): Dictionary containing debug information, keys in RESTART_FNC_EXCLUDE. """ super().__init__() if isinstance(build_proj_cfg, BuildProjConfig) and isinstance(unit_cfg, UnitConfigs): self._prj_cfg = build_proj_cfg self._unit_cfg = unit_cfg + self._dbg_dict = dbg_dict else: err = ( 'Input arguments should be an instance of:' @@ -108,23 +110,29 @@ class SchedFuncs(ProblemLogger): unit_name = unit.rsplit('__', 1)[0] if code_generator == 'embedded_coder': - ext_def_str += f'extern void {unit_name}_step(void);\n' - call_str += f' {unit_name}_step();\n' if unit_name not in SchedFuncs.RESTART_FNC_EXCLUDE: init_ext_def_s += f'extern void {unit_name}_initialize(void);\n' init_call_s += f' {unit_name}_initialize();\n' + ext_def_str += f'extern void {unit_name}_step(void);\n' + call_str += f' {unit_name}_step();\n' + elif self._dbg_dict[unit_name]: + ext_def_str += f'extern void {unit_name}_step(void);\n' + call_str += f' {unit_name}_step();\n' else: - ext_def_str += f'extern void {unit_name}(void);\n' if generate_rte_checkpoint_calls: call_str += ( f' Rte_Call_{function_name}_' f'{function_name}LogicalCheckpointReached_CddPFMC_ASILD_' f'{function_name}_LogicalCheckpointReached(ID_{unit_name});\n' ) - call_str += f' {unit_name}();\n' if unit_name not in SchedFuncs.RESTART_FNC_EXCLUDE: init_ext_def_s += f'extern void RESTART_{unit_name}(void);\n' init_call_s += f' RESTART_{unit_name}();\n' + ext_def_str += f'extern void {unit_name}(void);\n' + call_str += f' {unit_name}();\n' + elif self._dbg_dict[unit_name]: + ext_def_str += f'extern void {unit_name}(void);\n' + call_str += f' {unit_name}();\n' ext_def_str += '\n' call_str += '}\n' call_str += f'#include "{build_defs.CVC_CODE_END}"\n\n' diff --git a/tests/powertrain_build/reference_files/VcDebug.a2l b/tests/powertrain_build/reference_files/VcDebug.a2l new file mode 100644 index 0000000..45c45bd --- /dev/null +++ b/tests/powertrain_build/reference_files/VcDebug.a2l @@ -0,0 +1,47 @@ + + /begin CHARACTERISTIC + cVcAc_D_EngRunReqClim_db /* Name */ + "Engine running request (inhibit stop) from climate" /* LongIdentifier */ + VALUE /* Datatype */ + 0x00000000 /* address: cVcAc_D_EngRunReqClim_db */ + UBYTE_COL_DIRECT /* Deposit */ + 0 /* MaxDiff */ + VcDebug_1_0_0_ /* Conversion */ + 0 /* LowerLimit */ + 3 /* UpperLimit */ + /end CHARACTERISTIC + + /begin CHARACTERISTIC + cVcAc_D_EngRunReqClim_sw /* Name */ + "debug switch for cVcAc_D_EngRunReqClim_db (1=bdsw act)" /* LongIdentifier */ + VALUE /* Datatype */ + 0x00000000 /* address: cVcAc_D_EngRunReqClim_sw */ + UBYTE_COL_DIRECT /* Deposit */ + 0 /* MaxDiff */ + VcDebug_1_0_0_ /* Conversion */ + 0 /* LowerLimit */ + 1 /* UpperLimit */ + /end CHARACTERISTIC + + /begin COMPU_METHOD + VcDebug_1_0_0_ /* Name */ + "" /* LongIdentifier */ + RAT_FUNC /* ConversionType */ + "%11.3" /* Format */ + "" /* Unit */ + COEFFS 0 1 0.0 0 0 1 + /end COMPU_METHOD + + /begin FUNCTION + VcDebug /* Name */ + "" /* LongIdentifier */ + /begin DEF_CHARACTERISTIC + cVcAc_D_EngRunReqClim_db /* Identifier */ + cVcAc_D_EngRunReqClim_sw /* Identifier */ + /end DEF_CHARACTERISTIC + /end FUNCTION + + /begin RECORD_LAYOUT + UBYTE_COL_DIRECT /* Name */ + FNC_VALUES 1 UBYTE COLUMN_DIR DIRECT + /end RECORD_LAYOUT diff --git a/tests/powertrain_build/reference_files/VcDebug.c b/tests/powertrain_build/reference_files/VcDebug.c new file mode 100644 index 0000000..8b94517 --- /dev/null +++ b/tests/powertrain_build/reference_files/VcDebug.c @@ -0,0 +1,29 @@ +#include "tl_base_types.h" +#define CVC_DISP +#include "CVC_DISP_START.h" +extern CVC_DISP UInt8 sVcAc_D_EngRunReqClim; +#include "CVC_DISP_END.h" + +#include "CVC_CAL_START.h" + +/* Debug values */ + +volatile UInt8 cVcAc_D_EngRunReqClim_db = 0; + +/* Debug switches */ + +volatile Bool cVcAc_D_EngRunReqClim_sw = 0; +#include "CVC_CAL_END.h" + +/***********************/ +/* debug functionality */ +/***********************/ + +#include "CVC_CODE_START.h" +void VcDebug(void) { + if (cVcAc_D_EngRunReqClim_sw) { + sVcAc_D_EngRunReqClim = cVcAc_D_EngRunReqClim_db; + } +} +#include "CVC_CODE_END.h" + diff --git a/tests/powertrain_build/reference_files/VcDebugOutput.a2l b/tests/powertrain_build/reference_files/VcDebugOutput.a2l new file mode 100644 index 0000000..31a66a7 --- /dev/null +++ b/tests/powertrain_build/reference_files/VcDebugOutput.a2l @@ -0,0 +1,47 @@ + + /begin CHARACTERISTIC + cVcAc_D_AirCondCmpsrStats_db /* Name */ + "Aircond compressor status" /* LongIdentifier */ + VALUE /* Datatype */ + 0x00000000 /* address: cVcAc_D_AirCondCmpsrStats_db */ + UBYTE_COL_DIRECT /* Deposit */ + 0 /* MaxDiff */ + VcDebugOutput_1_0_0_ /* Conversion */ + 0 /* LowerLimit */ + 7 /* UpperLimit */ + /end CHARACTERISTIC + + /begin CHARACTERISTIC + cVcAc_D_AirCondCmpsrStats_sw /* Name */ + "debug switch for cVcAc_D_AirCondCmpsrStats_db (1=bdsw act)" /* LongIdentifier */ + VALUE /* Datatype */ + 0x00000000 /* address: cVcAc_D_AirCondCmpsrStats_sw */ + UBYTE_COL_DIRECT /* Deposit */ + 0 /* MaxDiff */ + VcDebugOutput_1_0_0_ /* Conversion */ + 0 /* LowerLimit */ + 1 /* UpperLimit */ + /end CHARACTERISTIC + + /begin COMPU_METHOD + VcDebugOutput_1_0_0_ /* Name */ + "" /* LongIdentifier */ + RAT_FUNC /* ConversionType */ + "%11.3" /* Format */ + "" /* Unit */ + COEFFS 0 1 0.0 0 0 1 + /end COMPU_METHOD + + /begin FUNCTION + VcDebugOutput /* Name */ + "" /* LongIdentifier */ + /begin DEF_CHARACTERISTIC + cVcAc_D_AirCondCmpsrStats_db /* Identifier */ + cVcAc_D_AirCondCmpsrStats_sw /* Identifier */ + /end DEF_CHARACTERISTIC + /end FUNCTION + + /begin RECORD_LAYOUT + UBYTE_COL_DIRECT /* Name */ + FNC_VALUES 1 UBYTE COLUMN_DIR DIRECT + /end RECORD_LAYOUT diff --git a/tests/powertrain_build/reference_files/VcDebugOutput.c b/tests/powertrain_build/reference_files/VcDebugOutput.c new file mode 100644 index 0000000..4d9bd93 --- /dev/null +++ b/tests/powertrain_build/reference_files/VcDebugOutput.c @@ -0,0 +1,29 @@ +#include "tl_base_types.h" +#define CVC_DISP +#include "CVC_DISP_START.h" +extern CVC_DISP UInt8 sVcAc_D_AirCondCmpsrStats; +#include "CVC_DISP_END.h" + +#include "CVC_CAL_START.h" + +/* Debug values */ + +volatile UInt8 cVcAc_D_AirCondCmpsrStats_db = 0; + +/* Debug switches */ + +volatile Bool cVcAc_D_AirCondCmpsrStats_sw = 0; +#include "CVC_CAL_END.h" + +/***********************/ +/* debug functionality */ +/***********************/ + +#include "CVC_CODE_START.h" +void VcDebugOutput(void) { + if (cVcAc_D_AirCondCmpsrStats_sw) { + sVcAc_D_AirCondCmpsrStats = cVcAc_D_AirCondCmpsrStats_db; + } +} +#include "CVC_CODE_END.h" + diff --git a/tests/powertrain_build/reference_files/VcDummyRaster.c b/tests/powertrain_build/reference_files/VcDummyRaster.c new file mode 100644 index 0000000..d825a73 --- /dev/null +++ b/tests/powertrain_build/reference_files/VcDummyRaster.c @@ -0,0 +1,11 @@ +#include "Rte_Type.h" + +extern void VcModelName(void); + +#include "CVC_CODE_START.h" +void PROJ_VcDummyRaster(void) +{ + VcModelName(); +} +#include "CVC_CODE_END.h" + diff --git a/tests/powertrain_build/reference_files/VcDummyRaster.h b/tests/powertrain_build/reference_files/VcDummyRaster.h new file mode 100644 index 0000000..a042e03 --- /dev/null +++ b/tests/powertrain_build/reference_files/VcDummyRaster.h @@ -0,0 +1,6 @@ +#ifndef VCDUMMYRASTER_H +#define VCDUMMYRASTER_H + +void PROJ_VcDummyRaster(void); + +#endif //VCDUMMYRASTER_H diff --git a/tests/powertrain_build/reference_files/VcExtINI.c b/tests/powertrain_build/reference_files/VcExtINI.c index 324d0c3..2914410 100644 --- a/tests/powertrain_build/reference_files/VcExtINI.c +++ b/tests/powertrain_build/reference_files/VcExtINI.c @@ -1,8 +1,10 @@ +extern void RESTART_VcModelName(void); #include "CVC_CODE_START.h" void PROJ_VcExtINI(void) { + RESTART_VcModelName(); } #include "CVC_CODE_END.h" diff --git a/tests/powertrain_build/reference_files/VcExtINI.h b/tests/powertrain_build/reference_files/VcExtINI.h new file mode 100644 index 0000000..874655f --- /dev/null +++ b/tests/powertrain_build/reference_files/VcExtINI.h @@ -0,0 +1,4 @@ +#ifndef VCEXTINI_H +#define VCEXTINI_H +void PROJ_VcExtINI(void); +#endif diff --git a/tests/powertrain_build/reference_files/ts_test.h b/tests/powertrain_build/reference_files/ts_test.h index 46b8230..fe6aa5d 100644 --- a/tests/powertrain_build/reference_files/ts_test.h +++ b/tests/powertrain_build/reference_files/ts_test.h @@ -1,4 +1,8 @@ /* Autogenerated by build system */ #ifndef TS_TEST_H #define TS_TEST_H + +/**** raster VcDummyRaster *****/ + +#define ts_VcModelName ((Float32) 0.01F) #endif /* TS_TEST_H */ diff --git a/tests/powertrain_build/test_build.py b/tests/powertrain_build/test_build.py index 4fbe374..1a7eed4 100644 --- a/tests/powertrain_build/test_build.py +++ b/tests/powertrain_build/test_build.py @@ -154,14 +154,13 @@ class TestBuild(unittest.TestCase): core.get_current_core_config = MagicMock() self.assertRaises(ValueError, build.generate_core_dummy, self.build_cfg, core, self.unit_cfg) - def test_generate_ext_var(self): + def test_generate_external_var(self): """Check that ExtVar files are generated.""" self.build_cfg.has_yaml_interface = False - signal_if = MagicMock(spec_set=CsvSignalInterfaces) - signal_if.get_external_io = MagicMock(return_value=( - { - 'EMS-Output': {}, - 'EMS-Input': {'DummyIn': { + nrm_dict = { + 'EMS-Output': {}, + 'EMS-Input': { + 'DummyIn': { 'type': 'Float32', 'min': 0, 'max': 100, @@ -170,16 +169,19 @@ class TestBuild(unittest.TestCase): 'init': 0, 'element_index': 5, 'IOType': 'x' - }}, - 'LIN-Output': {}, - 'LIN-Input': {}, - 'CAN-Output': {}, - 'CAN-Input': {}, - 'Private CAN-Output': {}, - 'Private CAN-Input': {} - }, { - 'EMS-Output': {}, - 'EMS-Input': {'DummyInSafe': { + } + }, + 'LIN-Output': {}, + 'LIN-Input': {}, + 'CAN-Output': {}, + 'CAN-Input': {}, + 'Private CAN-Output': {}, + 'Private CAN-Input': {} + } + dep_dict = { + 'EMS-Output': {}, + 'EMS-Input': { + 'DummyInSafe': { 'type': 'Float32', 'min': 0, 'max': 100, @@ -188,32 +190,29 @@ class TestBuild(unittest.TestCase): 'init': 0, 'element_index': 5, 'IOType': 's' - }}, - 'LIN-Output': {}, - 'LIN-Input': {}, - 'CAN-Output': {}, - 'CAN-Input': {}, - 'Private CAN-Output': {}, - 'Private CAN-Input': {} - }, {}, {} - )) + } + }, + 'LIN-Output': {}, + 'LIN-Input': {}, + 'CAN-Output': {}, + 'CAN-Input': {}, + 'Private CAN-Output': {}, + 'Private CAN-Input': {} + } + sec_dict = {} filepath = str(Path(SRC_DIR, 'output')) files = [ filepath + '/VcExtVar.c', filepath + '/VcExtVar.a2l', filepath + '/VcExtVarSafe.c', - filepath + '/VcExtVarSafe.a2l', - filepath + '/VcDebug.c', - filepath + '/VcDebug.a2l', - filepath + '/VcDebugOutput.c', - filepath + '/VcDebugOutput.a2l'] + filepath + '/VcExtVarSafe.a2l' + ] remove(*files) with patch('powertrain_build.user_defined_types.UserDefinedTypes') as udt_mock: udt_mock.return_value.common_header_files = PropertyMock(return_value=[]) - build.generate_ext_var( - self.build_cfg, self.unit_cfg, signal_if, udt_mock, build_defs.CVC_ASIL_B, build_defs.ASIL_B + build.generate_external_var( + self.build_cfg, self.unit_cfg, udt_mock, build_defs.ASIL_B, nrm_dict, dep_dict, sec_dict ) - signal_if.get_external_io.assert_called_once() self.build_cfg.get_src_code_dst_dir.assert_called() exists(*files) self.assertFalse(os.path.isfile(f"{filepath}/VcExtVarSecure.c")) diff --git a/tests/powertrain_build/test_ext_dbg.py b/tests/powertrain_build/test_ext_dbg.py index c3eedfb..90215e8 100644 --- a/tests/powertrain_build/test_ext_dbg.py +++ b/tests/powertrain_build/test_ext_dbg.py @@ -5,11 +5,13 @@ import unittest from unittest.mock import MagicMock +from pathlib import Path from powertrain_build.ext_dbg import ExtDbg from powertrain_build.build_proj_config import BuildProjConfig -from powertrain_build.unit_configs import UnitConfigs from .io_cnfg import DBG_CNFG_DICT +SRC_DIR = Path(__file__).parent + class TestExtDbg(unittest.TestCase): """Test case for testing the ExtDbg class.""" @@ -17,13 +19,27 @@ class TestExtDbg(unittest.TestCase): def setUp(self): """Set-up common data structures for all tests in the test case.""" self.build_cfg = MagicMock(spec_set=BuildProjConfig) - self.unit_cfg = MagicMock(spec_set=UnitConfigs) self.build_cfg.get_ecu_info = MagicMock(return_value=('Denso', 'G2')) + self.unit_cfg = MagicMock() + self.unit_cfg.base_types_headers = '#include "tl_base_types.h"\n' + self.ext_dbg = ExtDbg(DBG_CNFG_DICT['VED4_GENIII'], self.build_cfg, self.unit_cfg) + prj_out_dir = Path(SRC_DIR, 'output') + self.file_path_inputs = Path(prj_out_dir, 'VcDebug') + self.file_path_outputs = Path(prj_out_dir, 'VcDebugOutput') + self.generated_debug_files = [ + self.file_path_inputs.with_suffix('.c'), + self.file_path_inputs.with_suffix('.a2l'), + self.file_path_outputs.with_suffix('.c'), + self.file_path_outputs.with_suffix('.a2l') + ] + for file_path in self.generated_debug_files: + if file_path.exists(): + file_path.unlink() + def test_restruct_data(self): """Check restructuring of variable dict.""" - result = self.ext_dbg._restruct_data() expected = { 'inputs': { '1': { @@ -54,4 +70,23 @@ class TestExtDbg(unittest.TestCase): } } } - self.assertDictEqual(result, expected) + self.assertDictEqual(self.ext_dbg.dbg_dict, expected) + + def test_gen_dbg_files(self): + """Check generation of debug files.""" + self.ext_dbg.gen_dbg_files(self.file_path_inputs.as_posix(), self.file_path_outputs.as_posix()) + + for file_path in self.generated_debug_files: + self.assertTrue(file_path.exists(), f'File {file_path} was not created.') + with file_path.open(mode='r', encoding='utf-8') as file_handle: + result = file_handle.read() + with Path(SRC_DIR, 'reference_files', file_path.name).open(mode='r', encoding='utf-8') as file_handle: + expected = file_handle.read() + self.assertEqual(result, expected, f'Content of {file_path} does not match expected content.') + + def test_gen_dbg_files_no_debug_variables(self): + """Check generation of debug files, without any debug variables.""" + self.ext_dbg.dbg_dict = {'inputs': {}, 'outputs': {}} + self.ext_dbg.gen_dbg_files(self.file_path_inputs.as_posix(), self.file_path_outputs.as_posix()) + for file_path in self.generated_debug_files: + self.assertFalse(file_path.exists(), f'File {file_path} was created.') diff --git a/tests/powertrain_build/test_sched_funcs.py b/tests/powertrain_build/test_sched_funcs.py index 2373d9a..9fc1ca5 100644 --- a/tests/powertrain_build/test_sched_funcs.py +++ b/tests/powertrain_build/test_sched_funcs.py @@ -5,8 +5,6 @@ import unittest from unittest.mock import MagicMock -from os.path import exists -from os import remove from pathlib import Path from powertrain_build.build_proj_config import BuildProjConfig from powertrain_build.sched_funcs import SchedFuncs @@ -27,18 +25,34 @@ class TestSchedFuncs(unittest.TestCase): self.build_cfg.get_src_code_dst_dir = MagicMock(return_value=str(prj_out_dir)) self.build_cfg.get_prj_config = MagicMock(return_value='CFG1') self.build_cfg.get_scheduler_prefix = MagicMock(return_value='PROJ_') + self.build_cfg.get_units_raster_cfg = MagicMock( + return_value={ + 'SampleTimes': { + 'VcDummyRaster': 0.01 + }, + 'Rasters': { + 'VcDummyRaster': ['VcDebug', 'VcModelName'] + } + } + ) self.unit_cfg = MagicMock(spec_set=UnitConfigs) - self.init_file = str(Path(prj_out_dir, 'VcExtINI.c')) - if exists(self.init_file): - remove(self.init_file) + self.ts_file = Path(prj_out_dir, 'ts_test.h') + self.generated_sched_files = [ + Path(prj_out_dir, 'VcExtINI.h'), + Path(prj_out_dir, 'VcExtINI.c'), + Path(prj_out_dir, 'VcDummyRaster.c'), + Path(prj_out_dir, 'VcDummyRaster.h') + ] - self.ts_file = str(Path(prj_out_dir, 'ts_test.h')) - if exists(self.ts_file): - remove(self.ts_file) + for file_path in self.generated_sched_files + [self.ts_file]: + if file_path.exists(): + file_path.unlink() - self.sched_funcs = SchedFuncs(self.build_cfg, self.unit_cfg) + self.dbg_dict = {d: {} for d in SchedFuncs.RESTART_FNC_EXCLUDE} + + self.sched_funcs = SchedFuncs(self.build_cfg, self.unit_cfg, self.dbg_dict) def test_init_failure(self): """Check class init.""" @@ -47,23 +61,39 @@ class TestSchedFuncs(unittest.TestCase): 'Input arguments should be an instance of:' f'BuildProjConfig, not {type(None)}' f'AND/OR UnitConfigs, not {type(None)}', - SchedFuncs, None, None + SchedFuncs, None, None, {} ) def test_generate_sched_c_fncs(self): """Check generated scheduling raster functions.""" self.sched_funcs.generate_sched_c_fncs(False) - with open(self.init_file, encoding="utf-8") as fhandle: - result = fhandle.read() - with Path(SRC_DIR, 'reference_files', 'VcExtINI.c').open(encoding="utf-8") as fhandle: - expected = fhandle.read() - self.assertEqual(result, expected) + for file_path in self.generated_sched_files: + self.assertTrue(file_path.exists(), f'File {file_path} was not created.') + with file_path.open(mode='r', encoding='utf-8') as file_handle: + result = file_handle.read() + with Path(SRC_DIR, 'reference_files', file_path.name).open(mode='r', encoding='utf-8') as file_handle: + expected = file_handle.read() + self.assertEqual(result, expected, f'Content of {file_path} does not match expected content.') + + def test_generate_sched_c_fncs_with_debug(self): + """Check generated scheduling raster functions, including debug dict.""" + self.dbg_dict['VcDebug'].update({'VcModelname': {'dummy_data': 'test'}}) + self.sched_funcs = SchedFuncs(self.build_cfg, self.unit_cfg, self.dbg_dict) + self.sched_funcs.generate_sched_c_fncs(False) + for file_path in self.generated_sched_files: + self.assertTrue(file_path.exists(), f'File {file_path} was not created.') + with file_path.open(mode='r', encoding='utf-8') as file_handle: + result = file_handle.read() + if file_path.name == 'VcDummyRaster.c': + self.assertIn('VcDebug', result, f'VcDebug should be in {file_path}.') + else: + self.assertNotIn('VcDebug', result, f'VcDebug should not be in {file_path}.') def test_generate_ts_defines(self): """Check the ts defines generated for all units.""" self.sched_funcs.generate_ts_defines(self.ts_file) - with open(self.ts_file, encoding="utf-8") as fhandle: - result = fhandle.read() - with Path(SRC_DIR, 'reference_files', 'ts_test.h').open(encoding="utf-8") as fhandle: - expected = fhandle.read() + with self.ts_file.open(mode='r', encoding='utf-8') as file_handle: + result = file_handle.read() + with Path(SRC_DIR, 'reference_files', 'ts_test.h').open(encoding='utf-8') as file_handle: + expected = file_handle.read() self.assertEqual(result, expected)