forked from commaai/panda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '08c95bf47ba6d0c5d11a7616e42e10b8dbde19eb'
- Loading branch information
Showing
14 changed files
with
152 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,7 @@ nosetests.xml | |
*.gcno | ||
tests/safety/coverage-out | ||
tests/safety/coverage.info | ||
|
||
*.profraw | ||
*.profdata | ||
mull.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import subprocess | ||
import argparse | ||
|
||
from panda import Panda | ||
|
||
board_path = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("--all", action="store_true", help="Recover all Panda devices") | ||
args = parser.parse_args() | ||
|
||
subprocess.check_call(f"scons -C {board_path}/.. -j$(nproc) {board_path}", shell=True) | ||
|
||
serials = Panda.list() | ||
print(f"found {len(serials)} panda(s) - {serials}") | ||
if args.all: | ||
serials = Panda.list() | ||
print(f"found {len(serials)} panda(s) - {serials}") | ||
else: | ||
serials = [None] | ||
|
||
for s in serials: | ||
print("flashing", s) | ||
with Panda(serial=s) as p: | ||
print("flashing", p.get_usb_serial()) | ||
p.flash() | ||
exit(1 if len(serials) == 0 else 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import subprocess | ||
import argparse | ||
|
||
from panda import PandaJungle | ||
|
||
board_path = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("--all", action="store_true", help="Recover all panda jungle devices") | ||
args = parser.parse_args() | ||
|
||
subprocess.check_call(f"scons -C {board_path}/.. -u -j$(nproc) {board_path}", shell=True) | ||
|
||
serials = PandaJungle.list() | ||
print(f"found {len(serials)} panda jungle(s) - {serials}") | ||
if args.all: | ||
serials = PandaJungle.list() | ||
print(f"found {len(serials)} panda jungles(s) - {serials}") | ||
else: | ||
serials = [None] | ||
|
||
for s in serials: | ||
print("flashing", s) | ||
with PandaJungle(serial=s) as p: | ||
print("flashing", p.get_usb_serial()) | ||
p.flash() | ||
|
||
exit(1 if len(serials) == 0 else 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" | ||
cd $DIR | ||
|
||
if ! command -v "mull-runner-17" > /dev/null 2>&1; then | ||
sudo apt-get update && sudo apt-get install -y curl clang-17 | ||
curl -1sLf 'https://dl.cloudsmith.io/public/mull-project/mull-stable/setup.deb.sh' | sudo -E bash | ||
sudo apt-get update && sudo apt-get install -y mull-17 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" | ||
cd $DIR | ||
|
||
$DIR/install_mull.sh | ||
|
||
GIT_REF="${GIT_REF:-origin/master}" | ||
GIT_ROOT=$(git rev-parse --show-toplevel) | ||
echo -e "mutators:\n - cxx_all" > $GIT_ROOT/mull.yml | ||
scons --mutation -j$(nproc) -D | ||
echo -e "timeout: 10000\ngitDiffRef: $GIT_REF\ngitProjectRoot: $GIT_ROOT" >> $GIT_ROOT/mull.yml | ||
|
||
SAFETY_MODELS=$(find * | grep "^test_.*\.py") | ||
for safety_model in ${SAFETY_MODELS[@]}; do | ||
echo "" | ||
echo "" | ||
echo -e "Testing mutations on : $safety_model" | ||
mull-runner-17 --ld-search-path /lib/x86_64-linux-gnu/ ../libpanda/libpanda.so -test-program=./$safety_model | ||
done |