Commit Graph

3 Commits

Author SHA1 Message Date
jonathanmetzman 6e38a76220
[infra] Improve test speed (#5118)
Make unittests take 20 seconds to run instead of 35.
Make integration tests take 50 seconds to run instead of 6 minutes.
Make CI take 6 minutes instead of 12 minutes.

1. Allow running tests in parallel. Locally this takes the time for running all tests (including integration tests) from 6 minutes to ~50 seconds. We don't do parallel by default since it doesn't really save any time unless running integration tests on my machine (probably due to overhead of starting ~70 processes). This also speeds up CI from about 12 minutes to 6 minutes  (since github actions has 2 cores per machine).
2. Fix how we run tests. I'm not exactly sure why, but the method we used for discovering tests, recursing through every directory and passing to unittest caused the build/infra tests to execute twice. Fixing this makes running unittests take ~20 seconds instead of ~35.

This change also uses pytest for running tests since it's easy to use it to run tests in parallel.
This change was made possible by #5113
2021-02-05 06:10:42 -08:00
Catena cyber 2db56c4174
Golang project uses compile_go_fuzzer script (#4685)
* Golang project uses compile_go_fuzzer script

* Kubernetes project uses compile_go_fuzzer script

* Adds golang to ci covergae builds

* fixup

* Golang coverage with go modules

cf coredns project
2020-11-21 07:11:43 -08:00
jonathanmetzman db8467bf30
[CI] Don't do coverage builds for engineless fuzzers. (#4374)
Coverage builds need to be special cased since they aren't specified
in sanitizers. Instead they are done for all C/C++ projects that
use libFuzzer.

Move all of this special casing to `should_build_coverage` and call that from
`should_build` so we have one place where we decide this.
Add tests as well.

Fixes: https://github.com/google/oss-fuzz/issues/4371
2020-08-26 11:59:56 -07:00