45d0d286f remove whitespace (#255)
e49d0dbbd Pedal: use avg between tracks (#253)
c597dcc89 VERSION update after health packet changes and minor misra test change
01072bec0 Misra 11.x: pointer usage. (#250)
fd68c26ab Propagate can_push errors (#249)
ce1daf206 Misra check only done for EON config
70d4fd7f6 cleanup docker container on failure
04756a037 Turning back Misra check: unvoluntarily change
fcb1208e1 fix weird code in USB_ReadPacket
b983cc8fe Re-wrote test_misra.sh
0b1920636 Misra 17.7: The value returned by a function having non-void return type shall be used. We should hang on initial failed safety_set_mode
06ee8bd2d Ignore Misra 5.4 until cppcheck bug (?) is fixed
4be858224 Update cppcheck commit and pass predefined params to avoid impossible combinations of configs
f45dd04c6 cppcheck: ignore redundantAssignment and selfAssignment for registers in llcan.h
9ce631155 Misra 12.1 (operator order) and 10.4 (incompatible essential types) fixes, arised after properly checking UID_BASE config
1cd34e564 Explicitly set the define and undefine for unknown configs in misra checks
5a024999d remove esp flash from run_automated_tests.sh
23e3684d7 Cppcheck unused functions (#247)
c97d60be6 Removed bad language
b031480a7 Missed adding Dockerfile
91ff6bb21 Run language checker in CI
205ec342a Improved language checker
f7bbab072 Language checker test
d9d0a62f2 Misra 5.5: missed this change from previous PR
85fa3c02a Misra 5.5: Identifiers shall be distinct from macro names (#246)
190d604a0 Pedal: 2 minor fixes to Misra 15.7 (else needed) and 17.7 (non-void output must be used)
8ea01ff12 Pedal: no built-in functions to avoid puts and putc re-definitions
1f40d1e6a Misra pedal (#245)
a4554e3e6 Ignore advisory Misra 19.2: the union keyword should not be used
e6dc4172b Minor indent error
247e128b4 Fix strict compiler on bootstub build
ba6856921 Removed build strict test and enabled -Werror flag
da11f0fa0 safety replay: update openpilot-tools after logreader fix
fc8b9e49b Cppcheck: also check pedal
f7bd2c2f3 Misra 10.4: fix last 2 violations (#242)
9be5fdead finished misra 17.8 (#241)
3c3aba3db Misra 10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category (#240)
f2a3a177b Misra 15_7: fix what seems to be a false positive of cppcheck
812ace538 Misra 15_7: if … else if constructs should be terminated with an else clause (#230)
79e9735ae rename 5_wifi_udp.py
3c3ff0c03 Update Jenkinsfile (#239)
1bd928437 Misra 17.7: the value returned by a function having non-void return shall be used (#237)
18c9e88bc Merge pull request #238 from commaai/misra_17_8
7ac321de4 Merge pull request #235 from commaai/memxxx
004e543cc Jenkins: run EON test first
4bff28620 Merge branch 'memxxx' of github.com:commaai/panda into memxxx
7cd80de23 typo
385e33b32 12.1 regression
955842bae WIP
ea908cbb7 10_1 violations: Operands shall not be of an inappropriate essential type (#233)
fa3303805 Fix Misra 5.3: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope (#236)
ebfe1c512 Merge branch 'master' of github.com:commaai/panda into memxxx
8c11470ef Fix EON test case
64e18e841 fix inverted logic to differentiate between dev and EON panda builds
36755a0fd Merge branch 'master' of github.com:commaai/panda into memxxx
e2981d612 skip wifi tests for EON panda build
db2eec98c Merge branch 'master' of github.com:commaai/panda into memxxx
11257e79a Ignore test 5_wifi_udp.py_ignore: too unreliable for now
6973c2a81 fix wifi tests
cf6985ad1 memxxx function changes to be Misra compliant
3a6cd2930 wifi threshold perc back to 20%. Problem wasn't this.
d92a03528 faster docker build for safety replay
3e9469b3e Fixing tests after min->MIN change
ecb9b6c01 Revert "Misra 10 1: Operands shall not be of an inappropriate essential type (#232)"
8732e4faf Misra 10 1: Operands shall not be of an inappropriate essential type (#232)
git-subtree-dir: panda
git-subtree-split: 45d0d286f4b5c893590a98ec1438b8a143b9605d
old-commit-hash: 1ff59baea7
commatwo_master
parent
de9b3512b3
commit
1b8e5096c2
78 changed files with 1565 additions and 719 deletions
@ -1,8 +0,0 @@ |
|||||||
PROJ_NAME = panda
|
|
||||||
CFLAGS = -g -Wall -Wextra -Wstrict-prototypes
|
|
||||||
|
|
||||||
CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4
|
|
||||||
CFLAGS += -mhard-float -DSTM32F4 -DSTM32F413xx -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
|
||||||
STARTUP_FILE = startup_stm32f413xx
|
|
||||||
|
|
||||||
include build.mk |
|
@ -1,3 +1,3 @@ |
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:65ac7a82a58b702c8c8b99cf7ee965c71cd59d5dfa663d3729a602bdea8ec4cd |
oid sha256:ff380e37bf47cf52d57bc128bdde48845ad4649fb2d521cafd3fc21b3e4cc61d |
||||||
size 601889 |
size 537193 |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:9591dc7b364d8e963152a4a15f0435e8631a9d4eacc95fca022574269047dada |
oid sha256:a8110042b1ae172881d3b7a85d7b06a2cdc8cfed7da06c35bca6668c223b57c5 |
||||||
size 6738 |
size 6700 |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:a312bdc79b5ac3c780f700869f73237256047e1f134310087cd1c4d3ef8255fd |
oid sha256:ab72c6b3f84092a1df088ec983392d9501c067f5d2df219e483423cdde8cad70 |
||||||
size 7352 |
size 7309 |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:e320fb1b6f44dadb3b819146ffce5cf4d1d5b0482d2ba7cddc4845899e47290c |
oid sha256:27c9d38068c9260165acdc47204b67f418f5c05898ff50f30fb72a3353e55589 |
||||||
size 12933 |
size 12832 |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:21e5ea5bc19e8d45cf4f32d451ea7f79a62c50e5a6c0e07cc7752ed0c9d295c3 |
oid sha256:d0d192a64b7d859a76a631cf9bfdb865825ca83172a455eff661217c56392638 |
||||||
size 1288438 |
size 1145211 |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:7ccd163515bc57fa7a1ce31361ec1bc70a1b3e2c82873e940dfaaaf1072b4d3d |
oid sha256:6bacf7eb5c98b53a3d6d7a1939510105114cf5c8a0c340dac1fb1df9acea3268 |
||||||
size 10525 |
size 10478 |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:8f2c6a79cf25619734b65bd7e1babaeb9702fa86c89a221c3f7ea2c7ab8c2146 |
oid sha256:5df62b93da61e8534a5ac79582cc34c1bf629ebaaf5bd17454d50e6cb86114b0 |
||||||
size 8325 |
size 8285 |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:2600c6ad35c8accf5aa0878a151aa69a3e21859fb7675b3ce71c0fb44ef7f521 |
oid sha256:64af095fe7662e0e2f5e30dee7cb931639d571a3874ecaec1dcf484ea1434c3c |
||||||
size 81942 |
size 81285 |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:75bc5bac6341c0e088408c2b1548eafa24b80287bd37f6807cf52cf652984fa3 |
oid sha256:d7789e6673b2cbc68f77ddd526f7d613c01073307c7e1fe583900337b6767daf |
||||||
size 3556 |
size 3534 |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:a631a141f5e85b8fcef77b5f756392d1b9546c336fae6a565f037d84dcbe3df7 |
oid sha256:0b1639a4684b0ffefee8671550dea9f2cc0080e88be98a9388e3c27c55cc8de6 |
||||||
size 3724 |
size 3700 |
||||||
|
@ -1,14 +1,21 @@ |
|||||||
#!/bin/bash |
#!/bin/bash -e |
||||||
TEST_FILENAME=${TEST_FILENAME:-nosetests.xml} |
TEST_FILENAME=${TEST_FILENAME:-nosetests.xml} |
||||||
if [ ! -f "/EON" ]; then |
if [ -f "/EON" ]; then |
||||||
TESTSUITE_NAME="Panda_Test-EON" |
TESTSUITE_NAME="Panda_Test-EON" |
||||||
else |
else |
||||||
TESTSUITE_NAME="Panda_Test-DEV" |
TESTSUITE_NAME="Panda_Test-DEV" |
||||||
fi |
fi |
||||||
|
|
||||||
cd boardesp |
if [ ! -z "${SKIPWIFI}" ] || [ -f "/EON" ]; then |
||||||
make flashall |
TEST_SCRIPTS=$(ls tests/automated/$1*.py | grep -v wifi) |
||||||
cd .. |
else |
||||||
|
TEST_SCRIPTS=$(ls tests/automated/$1*.py) |
||||||
|
fi |
||||||
|
|
||||||
|
IFS=$'\n' |
||||||
|
for NAME in $(nmcli --fields NAME con show | grep panda | awk '{$1=$1};1') |
||||||
|
do |
||||||
|
nmcli connection delete "$NAME" |
||||||
|
done |
||||||
|
|
||||||
PYTHONPATH="." python $(which nosetests) -v --with-xunit --xunit-file=./$TEST_FILENAME --xunit-testsuite-name=$TESTSUITE_NAME -s tests/automated/$1*.py |
PYTHONPATH="." python $(which nosetests) -v --with-xunit --xunit-file=./$TEST_FILENAME --xunit-testsuite-name=$TESTSUITE_NAME -s $TEST_SCRIPTS |
||||||
|
@ -1,9 +0,0 @@ |
|||||||
FROM ubuntu:16.04 |
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi python python-pip gcc g++ |
|
||||||
|
|
||||||
RUN pip install pycrypto==2.6.1 |
|
||||||
|
|
||||||
COPY . /panda |
|
||||||
|
|
||||||
WORKDIR /panda |
|
@ -1,15 +0,0 @@ |
|||||||
#!/bin/bash -e |
|
||||||
|
|
||||||
cd ../../board/ |
|
||||||
|
|
||||||
make -f Makefile.strict clean |
|
||||||
make -f Makefile.strict bin 2> compiler_output.txt |
|
||||||
|
|
||||||
|
|
||||||
if [[ -s "compiler_output.txt" ]] |
|
||||||
then |
|
||||||
echo "Found alerts from the compiler:" |
|
||||||
cat compiler_output.txt |
|
||||||
exit 1 |
|
||||||
fi |
|
||||||
|
|
@ -0,0 +1,6 @@ |
|||||||
|
FROM ubuntu:16.04 |
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y make python python-pip |
||||||
|
COPY tests/safety/requirements.txt /panda/tests/safety/requirements.txt |
||||||
|
RUN pip install -r /panda/tests/safety/requirements.txt |
||||||
|
COPY . /panda |
@ -0,0 +1,201 @@ |
|||||||
|
Apache License |
||||||
|
Version 2.0, January 2004 |
||||||
|
http://www.apache.org/licenses/ |
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
||||||
|
|
||||||
|
1. Definitions. |
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction, |
||||||
|
and distribution as defined by Sections 1 through 9 of this document. |
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by |
||||||
|
the copyright owner that is granting the License. |
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all |
||||||
|
other entities that control, are controlled by, or are under common |
||||||
|
control with that entity. For the purposes of this definition, |
||||||
|
"control" means (i) the power, direct or indirect, to cause the |
||||||
|
direction or management of such entity, whether by contract or |
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity. |
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity |
||||||
|
exercising permissions granted by this License. |
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications, |
||||||
|
including but not limited to software source code, documentation |
||||||
|
source, and configuration files. |
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical |
||||||
|
transformation or translation of a Source form, including but |
||||||
|
not limited to compiled object code, generated documentation, |
||||||
|
and conversions to other media types. |
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or |
||||||
|
Object form, made available under the License, as indicated by a |
||||||
|
copyright notice that is included in or attached to the work |
||||||
|
(an example is provided in the Appendix below). |
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object |
||||||
|
form, that is based on (or derived from) the Work and for which the |
||||||
|
editorial revisions, annotations, elaborations, or other modifications |
||||||
|
represent, as a whole, an original work of authorship. For the purposes |
||||||
|
of this License, Derivative Works shall not include works that remain |
||||||
|
separable from, or merely link (or bind by name) to the interfaces of, |
||||||
|
the Work and Derivative Works thereof. |
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including |
||||||
|
the original version of the Work and any modifications or additions |
||||||
|
to that Work or Derivative Works thereof, that is intentionally |
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner |
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of |
||||||
|
the copyright owner. For the purposes of this definition, "submitted" |
||||||
|
means any form of electronic, verbal, or written communication sent |
||||||
|
to the Licensor or its representatives, including but not limited to |
||||||
|
communication on electronic mailing lists, source code control systems, |
||||||
|
and issue tracking systems that are managed by, or on behalf of, the |
||||||
|
Licensor for the purpose of discussing and improving the Work, but |
||||||
|
excluding communication that is conspicuously marked or otherwise |
||||||
|
designated in writing by the copyright owner as "Not a Contribution." |
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity |
||||||
|
on behalf of whom a Contribution has been received by Licensor and |
||||||
|
subsequently incorporated within the Work. |
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of |
||||||
|
this License, each Contributor hereby grants to You a perpetual, |
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||||
|
copyright license to reproduce, prepare Derivative Works of, |
||||||
|
publicly display, publicly perform, sublicense, and distribute the |
||||||
|
Work and such Derivative Works in Source or Object form. |
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of |
||||||
|
this License, each Contributor hereby grants to You a perpetual, |
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||||
|
(except as stated in this section) patent license to make, have made, |
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work, |
||||||
|
where such license applies only to those patent claims licensable |
||||||
|
by such Contributor that are necessarily infringed by their |
||||||
|
Contribution(s) alone or by combination of their Contribution(s) |
||||||
|
with the Work to which such Contribution(s) was submitted. If You |
||||||
|
institute patent litigation against any entity (including a |
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work |
||||||
|
or a Contribution incorporated within the Work constitutes direct |
||||||
|
or contributory patent infringement, then any patent licenses |
||||||
|
granted to You under this License for that Work shall terminate |
||||||
|
as of the date such litigation is filed. |
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the |
||||||
|
Work or Derivative Works thereof in any medium, with or without |
||||||
|
modifications, and in Source or Object form, provided that You |
||||||
|
meet the following conditions: |
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or |
||||||
|
Derivative Works a copy of this License; and |
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices |
||||||
|
stating that You changed the files; and |
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works |
||||||
|
that You distribute, all copyright, patent, trademark, and |
||||||
|
attribution notices from the Source form of the Work, |
||||||
|
excluding those notices that do not pertain to any part of |
||||||
|
the Derivative Works; and |
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its |
||||||
|
distribution, then any Derivative Works that You distribute must |
||||||
|
include a readable copy of the attribution notices contained |
||||||
|
within such NOTICE file, excluding those notices that do not |
||||||
|
pertain to any part of the Derivative Works, in at least one |
||||||
|
of the following places: within a NOTICE text file distributed |
||||||
|
as part of the Derivative Works; within the Source form or |
||||||
|
documentation, if provided along with the Derivative Works; or, |
||||||
|
within a display generated by the Derivative Works, if and |
||||||
|
wherever such third-party notices normally appear. The contents |
||||||
|
of the NOTICE file are for informational purposes only and |
||||||
|
do not modify the License. You may add Your own attribution |
||||||
|
notices within Derivative Works that You distribute, alongside |
||||||
|
or as an addendum to the NOTICE text from the Work, provided |
||||||
|
that such additional attribution notices cannot be construed |
||||||
|
as modifying the License. |
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and |
||||||
|
may provide additional or different license terms and conditions |
||||||
|
for use, reproduction, or distribution of Your modifications, or |
||||||
|
for any such Derivative Works as a whole, provided Your use, |
||||||
|
reproduction, and distribution of the Work otherwise complies with |
||||||
|
the conditions stated in this License. |
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise, |
||||||
|
any Contribution intentionally submitted for inclusion in the Work |
||||||
|
by You to the Licensor shall be under the terms and conditions of |
||||||
|
this License, without any additional terms or conditions. |
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify |
||||||
|
the terms of any separate license agreement you may have executed |
||||||
|
with Licensor regarding such Contributions. |
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade |
||||||
|
names, trademarks, service marks, or product names of the Licensor, |
||||||
|
except as required for reasonable and customary use in describing the |
||||||
|
origin of the Work and reproducing the content of the NOTICE file. |
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or |
||||||
|
agreed to in writing, Licensor provides the Work (and each |
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS, |
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
||||||
|
implied, including, without limitation, any warranties or conditions |
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the |
||||||
|
appropriateness of using or redistributing the Work and assume any |
||||||
|
risks associated with Your exercise of permissions under this License. |
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory, |
||||||
|
whether in tort (including negligence), contract, or otherwise, |
||||||
|
unless required by applicable law (such as deliberate and grossly |
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be |
||||||
|
liable to You for damages, including any direct, indirect, special, |
||||||
|
incidental, or consequential damages of any character arising as a |
||||||
|
result of this License or out of the use or inability to use the |
||||||
|
Work (including but not limited to damages for loss of goodwill, |
||||||
|
work stoppage, computer failure or malfunction, or any and all |
||||||
|
other commercial damages or losses), even if such Contributor |
||||||
|
has been advised of the possibility of such damages. |
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing |
||||||
|
the Work or Derivative Works thereof, You may choose to offer, |
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity, |
||||||
|
or other liability obligations and/or rights consistent with this |
||||||
|
License. However, in accepting such obligations, You may act only |
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf |
||||||
|
of any other Contributor, and only if You agree to indemnify, |
||||||
|
defend, and hold each Contributor harmless for any liability |
||||||
|
incurred by, or claims asserted against, such Contributor by reason |
||||||
|
of your accepting any such warranty or additional liability. |
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS |
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work. |
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following |
||||||
|
boilerplate notice, with the fields enclosed by brackets "{}" |
||||||
|
replaced with your own identifying information. (Don't include |
||||||
|
the brackets!) The text should be enclosed in the appropriate |
||||||
|
comment syntax for the file format. We also recommend that a |
||||||
|
file or class name and description of purpose be included on the |
||||||
|
same "printed page" as the copyright notice for easier |
||||||
|
identification within third-party archives. |
||||||
|
|
||||||
|
Copyright {yyyy} {name of copyright owner} |
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
you may not use this file except in compliance with the License. |
||||||
|
You may obtain a copy of the License at |
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software |
||||||
|
distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
See the License for the specific language governing permissions and |
||||||
|
limitations under the License. |
@ -0,0 +1,451 @@ |
|||||||
|
4r5e |
||||||
|
5h1t |
||||||
|
5hit |
||||||
|
a55 |
||||||
|
anal |
||||||
|
anus |
||||||
|
ar5e |
||||||
|
arrse |
||||||
|
arse |
||||||
|
ass |
||||||
|
ass-fucker |
||||||
|
asses |
||||||
|
assfucker |
||||||
|
assfukka |
||||||
|
asshole |
||||||
|
assholes |
||||||
|
asswhole |
||||||
|
a_s_s |
||||||
|
b!tch |
||||||
|
b00bs |
||||||
|
b17ch |
||||||
|
b1tch |
||||||
|
ballbag |
||||||
|
balls |
||||||
|
ballsack |
||||||
|
bastard |
||||||
|
beastial |
||||||
|
beastiality |
||||||
|
bellend |
||||||
|
bestial |
||||||
|
bestiality |
||||||
|
bi+ch |
||||||
|
biatch |
||||||
|
bitch |
||||||
|
bitcher |
||||||
|
bitchers |
||||||
|
bitches |
||||||
|
bitchin |
||||||
|
bitching |
||||||
|
bloody |
||||||
|
blow job |
||||||
|
blowjob |
||||||
|
blowjobs |
||||||
|
boiolas |
||||||
|
bollock |
||||||
|
bollok |
||||||
|
boner |
||||||
|
boob |
||||||
|
boobs |
||||||
|
booobs |
||||||
|
boooobs |
||||||
|
booooobs |
||||||
|
booooooobs |
||||||
|
breasts |
||||||
|
buceta |
||||||
|
bugger |
||||||
|
bum |
||||||
|
bunny fucker |
||||||
|
bullshit |
||||||
|
butt |
||||||
|
butthole |
||||||
|
buttmuch |
||||||
|
buttplug |
||||||
|
c0ck |
||||||
|
c0cksucker |
||||||
|
carpet muncher |
||||||
|
cawk |
||||||
|
chink |
||||||
|
cipa |
||||||
|
cl1t |
||||||
|
clit |
||||||
|
clitoris |
||||||
|
clits |
||||||
|
cnut |
||||||
|
cock |
||||||
|
cock-sucker |
||||||
|
cockface |
||||||
|
cockhead |
||||||
|
cockmunch |
||||||
|
cockmuncher |
||||||
|
cocks |
||||||
|
cocksuck |
||||||
|
cocksucked |
||||||
|
cocksucker |
||||||
|
cocksucking |
||||||
|
cocksucks |
||||||
|
cocksuka |
||||||
|
cocksukka |
||||||
|
cok |
||||||
|
cokmuncher |
||||||
|
coksucka |
||||||
|
coon |
||||||
|
cox |
||||||
|
crap |
||||||
|
cum |
||||||
|
cummer |
||||||
|
cumming |
||||||
|
cums |
||||||
|
cumshot |
||||||
|
cunilingus |
||||||
|
cunillingus |
||||||
|
cunnilingus |
||||||
|
cunt |
||||||
|
cuntlick |
||||||
|
cuntlicker |
||||||
|
cuntlicking |
||||||
|
cunts |
||||||
|
cyalis |
||||||
|
cyberfuc |
||||||
|
cyberfuck |
||||||
|
cyberfucked |
||||||
|
cyberfucker |
||||||
|
cyberfuckers |
||||||
|
cyberfucking |
||||||
|
d1ck |
||||||
|
damn |
||||||
|
dick |
||||||
|
dickhead |
||||||
|
dildo |
||||||
|
dildos |
||||||
|
dink |
||||||
|
dinks |
||||||
|
dirsa |
||||||
|
dlck |
||||||
|
dog-fucker |
||||||
|
doggin |
||||||
|
dogging |
||||||
|
donkeyribber |
||||||
|
doosh |
||||||
|
duche |
||||||
|
dyke |
||||||
|
ejaculate |
||||||
|
ejaculated |
||||||
|
ejaculates |
||||||
|
ejaculating |
||||||
|
ejaculatings |
||||||
|
ejaculation |
||||||
|
ejakulate |
||||||
|
f u c k |
||||||
|
f u c k e r |
||||||
|
f4nny |
||||||
|
fag |
||||||
|
fagging |
||||||
|
faggitt |
||||||
|
faggot |
||||||
|
faggs |
||||||
|
fagot |
||||||
|
fagots |
||||||
|
fags |
||||||
|
fanny |
||||||
|
fannyflaps |
||||||
|
fannyfucker |
||||||
|
fanyy |
||||||
|
fatass |
||||||
|
fcuk |
||||||
|
fcuker |
||||||
|
fcuking |
||||||
|
feck |
||||||
|
fecker |
||||||
|
felching |
||||||
|
fellate |
||||||
|
fellatio |
||||||
|
fingerfuck |
||||||
|
fingerfucked |
||||||
|
fingerfucker |
||||||
|
fingerfuckers |
||||||
|
fingerfucking |
||||||
|
fingerfucks |
||||||
|
fistfuck |
||||||
|
fistfucked |
||||||
|
fistfucker |
||||||
|
fistfuckers |
||||||
|
fistfucking |
||||||
|
fistfuckings |
||||||
|
fistfucks |
||||||
|
flange |
||||||
|
fook |
||||||
|
fooker |
||||||
|
fuck |
||||||
|
fucka |
||||||
|
fucked |
||||||
|
fucker |
||||||
|
fuckers |
||||||
|
fuckhead |
||||||
|
fuckheads |
||||||
|
fuckin |
||||||
|
fucking |
||||||
|
fuckings |
||||||
|
fuckingshitmotherfucker |
||||||
|
fuckme |
||||||
|
fucks |
||||||
|
fuckwhit |
||||||
|
fuckwit |
||||||
|
fudge packer |
||||||
|
fudgepacker |
||||||
|
fuk |
||||||
|
fuker |
||||||
|
fukker |
||||||
|
fukkin |
||||||
|
fuks |
||||||
|
fukwhit |
||||||
|
fukwit |
||||||
|
fux |
||||||
|
fux0r |
||||||
|
f_u_c_k |
||||||
|
gangbang |
||||||
|
gangbanged |
||||||
|
gangbangs |
||||||
|
gaylord |
||||||
|
gaysex |
||||||
|
goatse |
||||||
|
God |
||||||
|
god-dam |
||||||
|
god-damned |
||||||
|
goddamn |
||||||
|
goddamned |
||||||
|
hardcoresex |
||||||
|
hell |
||||||
|
heshe |
||||||
|
hoar |
||||||
|
hoare |
||||||
|
hoer |
||||||
|
homo |
||||||
|
hore |
||||||
|
horniest |
||||||
|
horny |
||||||
|
hotsex |
||||||
|
jack-off |
||||||
|
jackoff |
||||||
|
jap |
||||||
|
jerk-off |
||||||
|
jism |
||||||
|
jiz |
||||||
|
jizm |
||||||
|
jizz |
||||||
|
kawk |
||||||
|
knob |
||||||
|
knobead |
||||||
|
knobed |
||||||
|
knobend |
||||||
|
knobhead |
||||||
|
knobjocky |
||||||
|
knobjokey |
||||||
|
kock |
||||||
|
kondum |
||||||
|
kondums |
||||||
|
kum |
||||||
|
kummer |
||||||
|
kumming |
||||||
|
kums |
||||||
|
kunilingus |
||||||
|
l3i+ch |
||||||
|
l3itch |
||||||
|
labia |
||||||
|
lmfao |
||||||
|
lust |
||||||
|
lusting |
||||||
|
m0f0 |
||||||
|
m0fo |
||||||
|
m45terbate |
||||||
|
ma5terb8 |
||||||
|
ma5terbate |
||||||
|
masochist |
||||||
|
master-bate |
||||||
|
masterb8 |
||||||
|
masterbat* |
||||||
|
masterbat3 |
||||||
|
masterbate |
||||||
|
masterbation |
||||||
|
masterbations |
||||||
|
masturbate |
||||||
|
mo-fo |
||||||
|
mof0 |
||||||
|
mofo |
||||||
|
mothafuck |
||||||
|
mothafucka |
||||||
|
mothafuckas |
||||||
|
mothafuckaz |
||||||
|
mothafucked |
||||||
|
mothafucker |
||||||
|
mothafuckers |
||||||
|
mothafuckin |
||||||
|
mothafucking |
||||||
|
mothafuckings |
||||||
|
mothafucks |
||||||
|
mother fucker |
||||||
|
motherfuck |
||||||
|
motherfucked |
||||||
|
motherfucker |
||||||
|
motherfuckers |
||||||
|
motherfuckin |
||||||
|
motherfucking |
||||||
|
motherfuckings |
||||||
|
motherfuckka |
||||||
|
motherfucks |
||||||
|
muff |
||||||
|
mutha |
||||||
|
muthafecker |
||||||
|
muthafuckker |
||||||
|
muther |
||||||
|
mutherfucker |
||||||
|
n1gga |
||||||
|
n1gger |
||||||
|
nazi |
||||||
|
nigg3r |
||||||
|
nigg4h |
||||||
|
nigga |
||||||
|
niggah |
||||||
|
niggas |
||||||
|
niggaz |
||||||
|
nigger |
||||||
|
niggers |
||||||
|
nob |
||||||
|
nob jokey |
||||||
|
nobhead |
||||||
|
nobjocky |
||||||
|
nobjokey |
||||||
|
numbnuts |
||||||
|
nutsack |
||||||
|
orgasim |
||||||
|
orgasims |
||||||
|
orgasm |
||||||
|
orgasms |
||||||
|
p0rn |
||||||
|
pawn |
||||||
|
pecker |
||||||
|
penis |
||||||
|
penisfucker |
||||||
|
phonesex |
||||||
|
phuck |
||||||
|
phuk |
||||||
|
phuked |
||||||
|
phuking |
||||||
|
phukked |
||||||
|
phukking |
||||||
|
phuks |
||||||
|
phuq |
||||||
|
pigfucker |
||||||
|
pimpis |
||||||
|
piss |
||||||
|
pissed |
||||||
|
pisser |
||||||
|
pissers |
||||||
|
pisses |
||||||
|
pissflaps |
||||||
|
pissin |
||||||
|
pissing |
||||||
|
pissoff |
||||||
|
poop |
||||||
|
porn |
||||||
|
porno |
||||||
|
pornography |
||||||
|
pornos |
||||||
|
prick |
||||||
|
pricks |
||||||
|
pron |
||||||
|
pube |
||||||
|
pusse |
||||||
|
pussi |
||||||
|
pussies |
||||||
|
pussy |
||||||
|
pussys |
||||||
|
rectum |
||||||
|
retard |
||||||
|
rimjaw |
||||||
|
rimming |
||||||
|
s hit |
||||||
|
s.o.b. |
||||||
|
sadist |
||||||
|
schlong |
||||||
|
screwing |
||||||
|
scroat |
||||||
|
scrote |
||||||
|
scrotum |
||||||
|
semen |
||||||
|
sex |
||||||
|
sh!+ |
||||||
|
sh!t |
||||||
|
sh1t |
||||||
|
shag |
||||||
|
shagger |
||||||
|
shaggin |
||||||
|
shagging |
||||||
|
shemale |
||||||
|
shi+ |
||||||
|
shit |
||||||
|
shitdick |
||||||
|
shite |
||||||
|
shited |
||||||
|
shitey |
||||||
|
shitfuck |
||||||
|
shitfull |
||||||
|
shithead |
||||||
|
shiting |
||||||
|
shitings |
||||||
|
shits |
||||||
|
shitted |
||||||
|
shitter |
||||||
|
shitters |
||||||
|
shitting |
||||||
|
shittings |
||||||
|
shitty |
||||||
|
skank |
||||||
|
slut |
||||||
|
sluts |
||||||
|
smegma |
||||||
|
smut |
||||||
|
snatch |
||||||
|
son-of-a-bitch |
||||||
|
spac |
||||||
|
spunk |
||||||
|
s_h_i_t |
||||||
|
t1tt1e5 |
||||||
|
t1tties |
||||||
|
teets |
||||||
|
teez |
||||||
|
testical |
||||||
|
testicle |
||||||
|
tit |
||||||
|
titfuck |
||||||
|
tits |
||||||
|
titt |
||||||
|
tittie5 |
||||||
|
tittiefucker |
||||||
|
titties |
||||||
|
tittyfuck |
||||||
|
tittywank |
||||||
|
titwank |
||||||
|
tosser |
||||||
|
turd |
||||||
|
tw4t |
||||||
|
twat |
||||||
|
twathead |
||||||
|
twatty |
||||||
|
twunt |
||||||
|
twunter |
||||||
|
v14gra |
||||||
|
v1gra |
||||||
|
vagina |
||||||
|
viagra |
||||||
|
vulva |
||||||
|
w00se |
||||||
|
wang |
||||||
|
wank |
||||||
|
wanker |
||||||
|
wanky |
||||||
|
whoar |
||||||
|
whore |
||||||
|
willies |
||||||
|
willy |
||||||
|
xrated |
@ -0,0 +1,28 @@ |
|||||||
|
#!/usr/bin/env python |
||||||
|
|
||||||
|
import subprocess |
||||||
|
import sys |
||||||
|
|
||||||
|
checked_ext = ["h", "c", "py", "pyx", "cpp", "hpp", "md", "mk"] |
||||||
|
|
||||||
|
if __name__ == "__main__": |
||||||
|
with open("list.txt", 'r') as handle: |
||||||
|
|
||||||
|
suffix_cmd = " " |
||||||
|
for i in checked_ext: |
||||||
|
suffix_cmd += "--include \*." + i + " " |
||||||
|
|
||||||
|
found_bad_language = False |
||||||
|
for line in handle: |
||||||
|
line = line.rstrip('\n').rstrip(" ") |
||||||
|
try: |
||||||
|
cmd = "cd ../../; grep -R -i -w " + suffix_cmd + " '" + line + "'" |
||||||
|
res = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) |
||||||
|
print res |
||||||
|
found_bad_language = True |
||||||
|
except subprocess.CalledProcessError as e: |
||||||
|
pass |
||||||
|
if found_bad_language: |
||||||
|
sys.exit("Failed: found bad language") |
||||||
|
else: |
||||||
|
print "Success" |
@ -0,0 +1,8 @@ |
|||||||
|
# Advisory: union types can be used |
||||||
|
misra.19.2 |
||||||
|
# FIXME: add it back when fixed in cppcheck. Macro identifiers are unique but it false triggers on defines in #ifdef..#else conditions |
||||||
|
misra.5.4 |
||||||
|
# Advisory: casting from void pointer to type pointer is ok. Done by STM libraries as well |
||||||
|
misra.11.4 |
||||||
|
# Advisory: casting from void pointer to type pointer is ok. Done by STM libraries as well |
||||||
|
misra.11.5 |
@ -1,24 +1,53 @@ |
|||||||
#!/bin/bash -e |
#!/bin/bash -e |
||||||
|
|
||||||
|
mkdir /tmp/misra || true |
||||||
git clone https://github.com/danmar/cppcheck.git || true |
git clone https://github.com/danmar/cppcheck.git || true |
||||||
cd cppcheck |
cd cppcheck |
||||||
git fetch |
git fetch |
||||||
git checkout 44d6066c6fad32e2b0332b3f2b24bd340febaef8 |
git checkout 862c4ef87b109ae86c2d5f12769b7c8d199f35c5 |
||||||
make -j4 |
make -j4 |
||||||
cd ../../../ |
cd ../../../ |
||||||
|
|
||||||
# whole panda code |
|
||||||
tests/misra/cppcheck/cppcheck --dump --enable=all --inline-suppr board/main.c 2>/tmp/misra/cppcheck_output.txt || true |
printf "\nPANDA CODE\n" |
||||||
|
tests/misra/cppcheck/cppcheck -DPANDA -UPEDAL -DCAN3 -DUID_BASE -DEON \ |
||||||
|
--suppressions-list=tests/misra/suppressions.txt \ |
||||||
|
--dump --enable=all --inline-suppr --force \ |
||||||
|
board/main.c 2>/tmp/misra/cppcheck_output.txt |
||||||
|
|
||||||
python tests/misra/cppcheck/addons/misra.py board/main.c.dump 2> /tmp/misra/misra_output.txt || true |
python tests/misra/cppcheck/addons/misra.py board/main.c.dump 2> /tmp/misra/misra_output.txt || true |
||||||
|
|
||||||
# violations in safety files |
# strip (information) lines |
||||||
(cat /tmp/misra/misra_output.txt | grep safety) > /tmp/misra/misra_safety_output.txt || true |
cppcheck_output=$( cat /tmp/misra/cppcheck_output.txt | grep -v "(information) " ) || true |
||||||
(cat /tmp/misra/cppcheck_output.txt | grep safety) > /tmp/misra/cppcheck_safety_output.txt || true |
misra_output=$( cat /tmp/misra/misra_output.txt | grep -v "(information) " ) || true |
||||||
|
|
||||||
|
|
||||||
|
printf "\nPEDAL CODE\n" |
||||||
|
tests/misra/cppcheck/cppcheck -UPANDA -DPEDAL -UCAN3 \ |
||||||
|
--suppressions-list=tests/misra/suppressions.txt \ |
||||||
|
-I board/ --dump --enable=all --inline-suppr --force \ |
||||||
|
board/pedal/main.c 2>/tmp/misra/cppcheck_pedal_output.txt |
||||||
|
|
||||||
|
python tests/misra/cppcheck/addons/misra.py board/pedal/main.c.dump 2> /tmp/misra/misra_pedal_output.txt || true |
||||||
|
|
||||||
|
# strip (information) lines |
||||||
|
cppcheck_pedal_output=$( cat /tmp/misra/cppcheck_pedal_output.txt | grep -v "(information) " ) || true |
||||||
|
misra_pedal_output=$( cat /tmp/misra/misra_pedal_output.txt | grep -v "(information) " ) || true |
||||||
|
|
||||||
if [[ -s "/tmp/misra/misra_safety_output.txt" ]] || [[ -s "/tmp/misra/cppcheck_safety_output.txt" ]] |
if [[ -n "$misra_output" ]] || [[ -n "$cppcheck_output" ]] |
||||||
then |
then |
||||||
echo "Found Misra violations in the safety code:" |
echo "Failed! found Misra violations in panda code:" |
||||||
cat /tmp/misra/misra_safety_output.txt |
echo "$misra_output" |
||||||
cat /tmp/misra/cppcheck_safety_output.txt |
echo "$cppcheck_output" |
||||||
exit 1 |
exit 1 |
||||||
fi |
fi |
||||||
|
|
||||||
|
if [[ -n "$misra_pedal_output" ]] || [[ -n "$cppcheck_pedal_output" ]] |
||||||
|
then |
||||||
|
echo "Failed! found Misra violations in pedal code:" |
||||||
|
echo "$misra_pedal_output" |
||||||
|
echo "$cppcheck_pedal_output" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
echo "Success" |
||||||
|
Loading…
Reference in new issue