Skip to content

Commit

Permalink
cras: Declare "language: rust"
Browse files Browse the repository at this point in the history
The coverage builder complains that rust stdlib sources is missing.

```
Step google#5: �[0;31merror: /workspace/out/libfuzzer-coverage-x86_64/rustc/187b8131d4f760f856b214fce34534903276f2ef/library/core/src/panic.rs: No such file or directory
Step google#5: �[0m�[0;31mwarning: The file '/rustc/187b8131d4f760f856b214fce34534903276f2ef/library/core/src/panic.rs' isn't covered.
Step google#5: �[0m[2023-10-04 06:50:42,764 DEBUG] Finished generating per-file code coverage summary.
Step google#5: [2023-10-04 06:50:42,764 DEBUG] Generating file view html index file as: "/workspace/out/libfuzzer-coverage-x86_64/report/linux/file_view_index.html".
Step google#5: Traceback (most recent call last):
Step google#5:   File "/opt/code_coverage/coverage_utils.py", line 829, in <module>
Step google#5:     sys.exit(Main())
Step google#5:   File "/opt/code_coverage/coverage_utils.py", line 823, in Main
Step google#5:     return _CmdPostProcess(args)
Step google#5:   File "/opt/code_coverage/coverage_utils.py", line 780, in _CmdPostProcess
Step google#5:     processor.PrepareHtmlReport()
Step google#5:   File "/opt/code_coverage/coverage_utils.py", line 577, in PrepareHtmlReport
Step google#5:     self.GenerateFileViewHtmlIndexFile(per_file_coverage_summary,
Step google#5:   File "/opt/code_coverage/coverage_utils.py", line 450, in GenerateFileViewHtmlIndexFile
Step google#5:     self.GetCoverageHtmlReportPathForFile(file_path),
Step google#5:   File "/opt/code_coverage/coverage_utils.py", line 422, in GetCoverageHtmlReportPathForFile
Step google#5:     assert os.path.isfile(
Step google#5: AssertionError: "/rustc/187b8131d4f760f856b214fce34534903276f2ef/library/core/src/panic.rs" is not a file.
```

I think the sources would be copied in base-builder if we declare cras as a rust project:

https://github.com/google/oss-fuzz/blob/d514fac92686c656633aa8549fd6f239c964b2bc/infra/base-images/base-builder/compile#L226-L231

Fixes: https://crbug.com/oss-fuzz/62974
  • Loading branch information
afq984 committed Oct 15, 2023
1 parent d514fac commit 7ad9111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/cras/project.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
homepage: "https://www.chromium.org"
language: c++
language: rust
primary_contact: "paulhsia@chromium.org"
auto_ccs:
- "hychao@chromium.org"
Expand Down

0 comments on commit 7ad9111

Please sign in to comment.