Skip to content

Commit

Permalink
Fix up bc-java-wycheproof and enable build (google#8983)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmetzman authored and eamonnmcmanus committed Mar 15, 2023
1 parent 491fe06 commit 66a4f4d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions infra/ci/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ def should_build_coverage(project_yaml):
'"fuzzing_engines" if "none" is specified.')
assert len(engines) == 1, assert_message
return False
if 'wycheproof' in engines:
return False

language = project_yaml.get('language')
if language not in constants.LANGUAGES_WITH_COVERAGE_SUPPORT:
Expand Down
5 changes: 2 additions & 3 deletions infra/tools/wycheproof/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@


def main():
"""Runs whycheproof."""
"""Runs wycheproof."""
if len(sys.argv) < 3:
logging.error('Usage: %s <test_app> <testcase>.', sys.argv[0])
return 1

test_app = sys.argv[1]
return subprocess.run([test_app], check=False).returncode
return subprocess.run(sys.argv[1:], check=False).returncode


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion infra/tools/wycheproof/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def main():
args = get_args()
if not os.path.exists(args.output_dir):
os.mkdir(args.output_dir)
testcase = os.path.join(args.output_dir, 'testcase')
testcase = os.path.join(args.output_dir, 'fuzz-0')
with open(testcase, 'w') as file_handle:
file_handle.write(' ')
return 0
Expand Down
3 changes: 3 additions & 0 deletions projects/bc-java-wycheproof/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@

bazel build BouncyCastleAllTests
rsync -aLkR bazel-bin/* $OUT
# Add dummy fuzzer to fool bad build check.
printf "#!/bin/bash\n./bazel-bin/BouncyCastleAllTests" > $OUT/WycheproofTarget.bash
chmod +x $OUT/WycheproofTarget.bash
2 changes: 1 addition & 1 deletion projects/bc-java-wycheproof/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ fuzzing_engines:
sanitizers:
- "none"
file_github_issue: false
disabled: true
blackbox: true

0 comments on commit 66a4f4d

Please sign in to comment.