aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/cros_nonhardened_config_test.go
AgeCommit message (Collapse)Author
2021-06-18compiler_wrapper: fix flaky testsGeorge Burgess IV
We're running many tests in parallel that have dependencies on the `umask` global. We shouldn't be running these in parallel with each other, since they may read values for this that're set by other goroutines. Since these are difficult to spot, this CL does two things: - Requiring that all tests mark themselves as either readers of or writers to umask. Any test that does this gets run in serial with other tests that do it. - Requires code that modifies/reads the umask to go through `env.umask`, rather than `syscall.Umask`. This allows us to cheaply and accurately verify that a test's dependency on the process' umask was stated. BUG=b:186801841 TEST=`go test -count=100` passed Change-Id: Ifa871cfa48c005646499b21c1bfa1a4799ca641b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2956692 Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2019-11-01toolchain_utils: Remove comparison to old wrapper from compiler_wrapper.Tobias Bosch
BUG=chromium:773875 TEST='go test' passes Change-Id: Iecbe15067bf37fd86fbb8a907d42df32288821d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1884701 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Tobias Bosch <tbosch@google.com>
2019-09-26Support extra args for llvm next.Tobias Bosch
Also removes the capability of defining the old wrapper path now that we are getting close to landing it. BUG=chromium:773875 TEST=golden tests and comparison against old wrapper. Change-Id: I543ddb1651edf2a269917f8afb5a667129bc3561 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1826986 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-08-19Store change id as version in the config.Tobias Bosch
This helps in debugging the wrapper. The version can be printed via the -print-config command. BUG=chromium:773875 TEST=unit test Change-Id: Ic6f84b4ccaa4a201473c408022d80c73f6ee7899 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1760971 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-08-15Pass the old wrapper path as a linker argumentTobias Bosch
BUG=chromium:773875 TEST=unit test and comparison to old wrapper Change-Id: I97cff81f2b42a01f82ba66668693b17a27c14672 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1754130 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-08-13Create a goldenfile for every section.Tobias Bosch
Previously, a golden file contained multiple names sections. This change splits these into separate files, making changes easier to compare. BUG=chromium:773875 TEST=unit test Change-Id: Icffec335601297f504f98c4ff1654238f7838080 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1752523 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-07-22Add license headers to all go files.Tobias Bosch
Required as of https://chromium.git.corp.google.com/chromiumos/repohooks/+/9732e38a5551e4bbcd222d2bbb89ee0fc5c95dee BUG=chromium:773875 TEST=unit test Change-Id: I8dfed85b0fbd528084ff2e585bbf3624ac358135 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1710404 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-07-18Create golden tests for sysroot wrapper.Tobias Bosch
- Golden files can be updated via the new "-updategolden" test flag. - Golden files contain the wrapper command, commands executed by the wrapper stdout, stderr, exitcode of the wrapper - The commands in the golden files are also compared to the old wrapper to make sure they are correct. We are also mocking less things in the old wrapper now, allowing to compare against differnet wrappers via golden tests in the future (e.g. clang_host_wrapper). - Unit tests are no longer diffing against the old wrapper. BUG=chromium:773875 TEST=unit test Change-Id: I0755bfe11cd499474820c9354412d39a0fa04401 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1702633 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>