f47bf0fecf
The following is a buggy pattern that won't capture anything into err. The issue is benign, since a failed run would be eventually captured by a subsequent check. p = Run(["aapt", ...], stdout=subprocess.PIPE) output, err = p.communicate() if err: raise ... This CL changes the error detection to be based on the return code from aapt. It also adds some sanity test to ensure the call to aapt works. The test app is built from AOSP com.android.cts.ctsshim (chosen mostly because of its small size). Test: python -m unittest test_common Change-Id: I337f141bd0fc5f0801dfc628c601b88b7640789c
4.7 KiB
4.7 KiB