-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #672 from ohmtech-rdi/erb-fuzz-target
Add fuzz testing system
- Loading branch information
Showing
12 changed files
with
1,360 additions
and
3 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
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
52 changes: 52 additions & 0 deletions
52
build-system/erbb/generators/action/action_fuzz_template.py
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,52 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# action_daisy.py | ||
# Copyright (c) 2020 Raphael Dinge | ||
# | ||
#Tab=3######################################################################## | ||
|
||
|
||
##### IMPORT ################################################################# | ||
|
||
from __future__ import print_function | ||
import os | ||
import subprocess | ||
import sys | ||
|
||
PATH_ROOT = '%PATH_ROOT%' | ||
PATH_PROJECT = '%PATH_PROJECT%' | ||
|
||
sys.path.insert (0, os.path.join (PATH_ROOT, 'build-system')) | ||
import erbui | ||
|
||
|
||
|
||
############################################################################## | ||
|
||
if sys.version_info < (3, 7): | ||
print ('This script requires python 3.7 or greater.', file = sys.stderr) | ||
sys.exit (1) | ||
|
||
|
||
|
||
############################################################################## | ||
|
||
def find_erbui (): | ||
files = os.listdir (PATH_PROJECT) | ||
for file in files: | ||
if file.endswith ('.erbui'): | ||
return os.path.join (PATH_PROJECT, file) | ||
|
||
return None | ||
|
||
if __name__ == '__main__': | ||
try: | ||
project_path = os.path.abspath (PATH_PROJECT) | ||
artifacts_path = os.path.join (project_path, 'artifacts') | ||
|
||
ast = erbui.parse (find_erbui ()) | ||
erbui.generate_fuzz (artifacts_path, ast) | ||
|
||
except subprocess.CalledProcessError as error: | ||
print ('Action exited with %d' % error.returncode, file = sys.stderr) | ||
sys.exit (1) |
Oops, something went wrong.