aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/compile_with_fallback_test.go
AgeCommit message (Collapse)Author
2020-03-05wrapper: make a test consider the caller's umaskGeorge Burgess IV
Apparently my umask on my glinux system is 027 outside of the chroot, so this test fails for me. Mask out any bits that can't be set due to our umask. BUG=None TEST=go test Change-Id: I683a1ab315479e277d8b9b1fd3b61c96818bc055 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2088433 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2020-03-05wrapper: correctly Join() paths for AndroidGeorge Burgess IV
filepath.Join(".", "foo") folds to "foo", which is fine as long as we're not Exec()ing the result of that Join(). If we do, we might execute a binary we weren't expecting to (e.g., one looked up from ${PATH}, rather than the one at ${CWD}). BUG=None TEST=`go test` Change-Id: Ifbd247c2e489c786d0a0d3342b5d1b61a7320796 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2088432 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2019-10-17compiler_wrapper: remove WITH_TIDY support for android.Tobias Bosch
Also consolidates most of the android specific logic into one place so it's clear which flags are used and which ones are not. Also detects wrapping of clang-tidy for future special casing. BUG=chromium:773875 TEST=unit tests, golden tests TEST=android's test_compiler.py --with-tidy Change-Id: Ic83340ba63ec3ea4c3c174069d3dc017ecbcdd72 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1866603 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-10-02Android wrapper: Support compile with fallback.Tobias Bosch
The old android wrapper supports to use a fallback compiler in case of errors. This replicates this logic. See https://cs.corp.google.com/android/toolchain/llvm_android/compiler_wrapper.py. BUG=chromium:773875 TEST=unit test, golden tests comparing to old wrapper Change-Id: Iff7281e6e21c4834f9a4493884ed7b3d66b87967 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1833898 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>