Instead of reading the terminal size on every status update, register
for SIGWINCH to read and store the size when it changes.
This reapplies I555ad21a31a2c924ab0ca681e0c8f00df42a370a with a fix
for a race condition in TestSmartStatusOutputWidthChange.
Test: status_test.go
Change-Id: If342cb4cc8e4ed57af9e3bb417758348c9c41247
Where possible this duplicates any tests that use no_standard_libs:true
with ones that use sdk_version:"none". If not possible (e.g. in the
default targets included in java/testing.go) it switches some to use
sdk_version:"none" to ensure that there is no regression in the
behavior of no_standard_libs:true.
Follow up changes will switch all usages of no_standard_libs:true over
to use sdk_version:"none" at which point no_standard_libs will be
removed.
Bug: 134566750
Test: m droid
Change-Id: I5f0fd3daa980f6b223abe454cba7f25a97a39d7a
* changes:
Use SIGWINCH to update terminal size
Make status line bold
Move all output through StatusOutput
Remove terminal.Writer
Move smart and dumb terminals into separate implementations
Add tests for status output
Previously, different parts of the build used different sources of
information about the SDK (i.e. the default libraries) against which
a Java module aimed at the device was built. Some used the sdk_version
property, others used the no_standard_libs or no_framework_libs, some
used a combination of all three.
That lead to inconsistent handling in the code, e.g. some parts treated
no_standard_libs: true as implying no_framework_libs: true and others
did not, and also in the build files, e.g. some modules specified
no_framework_libs: true and sdk_version: "system_current" which makes
no sense, or no_standard_libs: true and sdk_version: "core_current"
which are inconsistent.
This is the first step in a refactoring to simplify the sdk selection
process by replacing the no_standard_libs/no_framework_libs properties
with some extra options for the sdk_version property. This change
consists of:
1) Extra functions sdkContext to access the no_standard_libs and
no_framework_libs properties.
2) Extra field/functions in sdkDep to store and access the value of
no_standard_libs/no_framework_libs.
3) Changes to decodeSdkDep(...) to pass the values of the no_...
properties through to the returned sdkDep.
4) Change all code that accesses the no_... properties directly to
call decodeSdkDep(...) to get an sdkDep object and then accessing
the values of the no_... properties from there.
The accessor functions on sdkDep are called has...() rather than
no...() as most callers of the methods invert the value anyway and
!no...() is harder to reason about than has...().
The hasFrameworkLibs() function returns true if and only if
no_standard_libs and no_framework_libs are false. That is consistent
with all but one usage of the no_framework_libs property and that is
not affected by it.
Bug: 134566750
Test: m droid
Change-Id: I196e3304e8bd802fb154e897397b0dd337f868e2
Exempt-From-Owner-Approval: Colin has already given +2 modulo some
minor nits and this blocking other changes.
The build generates a file out/soong/hiddenapi/hiddenapi-flags.csv
which is used by the hiddenapi-blacklist tests in cts/tests/signature.
The generation is done at the ninja level and so is not accessible from
the soong layer that runs on top. This change adds the hiddenapi-flags
module type which makes the file accessible from other soong modules.
Bug: 122332514
Test: atest -p cts/tests/signature
Change-Id: If38c8a8ffca110f2ae01f97f19a2740ca3fde1b7
Exempt-From-Owner-Approval: Colin has already reviewed and only had minor
nits and this is blocking other changes.
Instead of having all the object compilations depend on a stamp file,
instead depend on the headers, which are already available in the build
graph.
This allows my RBE builds to just find the headers, instead of having to
walk the graph to find the other outputs.
Test: treehugger
Test: build a system image with RBE
Change-Id: I0a310229be26d7bd399e074a4350d5be038f8661
I found these while trying to build an aosp_arm system image with RBE,
which only makes the sources that you depend on available to every rule.
The hardcoded prebuilts/sdk path is a bit unfortunate, but that's
currently hardcoded as a default in the script as well.
Bug: 130111713
Test: treehugger
Test: build a system image with RBE
Change-Id: I4415563017e053749788b0a537a48d61a2161935
Instead of reading the terminal size on every status update, register
for SIGWINCH to read and store the size when it changes.
Test: status_test.go
Change-Id: I555ad21a31a2c924ab0ca681e0c8f00df42a370a
Bolding the status line provides differentiation between output
of each command.
Test: status_test.go
Change-Id: I9d46761e69c5af0a0aa86c7921e121cfd2a3fc82
Write log output through StatusOutput so that the status implementation
can synchronize it with its own output.
Test: status_test.go
Change-Id: I917bdeeea4759a12b6b4aa6d6d86ee18a2771723
terminal.Writer is now just a wrapper around stdio.Stdout() without
any useful functionality. Replace it with stdio.Stdout() as an
io.Writer.
Test: ui/terminal/status_test.go
Change-Id: I5bc5476afdca950b505642f0135a3af9d37fbe24
Support for smart and dumb terminals are implemented in writer.go,
which makes dumb terminals much more complicated than necessary.
Move smart and dumb terminals into two separate implementations
of StatusOutput, with common code moved into a shared formatter
class.
Test: not yet
Change-Id: I59bbdae479f138b46cd0f03092720a3303e8f0fe
Unbundled builds may not have definitions of shared libraries, and
they are not dexpreopted so the dependencies are not used anyways.
Test: manual
Change-Id: I89ad92f3b073422734f824ac3a8a3b9baf995ccb
When building with ALLOW_MISSING_DEPENDENCIES=true, Soong replaces
rules in modules that have missing dependencies with ErrorRule
rules that print an error. The ErrorRules were not listing
implicit outputs, which could lead to dangling dependencies.
Test: manual
Change-Id: Ife1604c0a9a1159087b12568fd4c2b69517d81a7
* changes:
Consolidate *MutatorContext and ModuleContext into BaseModuleContext
Add test for missing defaults modules with AllowMissingDependencies
Capture missing dependency error rules
Share buildDir for android/soong/android tests
Reimplement AddMissingDependencies
Add GenerateAndroidBuildActions to DefaultsModuleBase
Previously, the tests had to use the Android.bp file in the root
directory of the mock file system. That prevented adding tests that are
dependent on the location of the Android.bp file, e.g. ones that use
no_standard_libs. This change will process any Android.bp in the mock
filesystem.
Bug: 134566750
Test: m
Change-Id: I6fb057a473a18e87bd1a89507e78ceb3fd171eb5
Modules that specify no_standard_libs: true should not specify the
sdk_version property as well because the former supercedes the latter.
Bug: 134566750
Test: m
Change-Id: I1d8663dc3a25baf23a1b136c7f35cf130cd7543b
genrule modules were not mutated by the apex mutator. As a result, a
module that is mutated for an apex have depended on the genrule modules
host_bionic_linker_{asm|flags} that are not mutated for the APEX.
This in turn caused an inconsistency problem because the
host_bionic_linker_* genrules use the dynamic linker that isn't mutated
for APEX as an input, while the outputs of the genrules are used by
modules mutated for APEX. The inconsistency caused b/135008828.
Fixing this issue by correctly let genrule to be mutated by the apex
mutator.
Bug: 135008828
Test: checkout master-art-host
ALLOW_MISSING_DEPENDENCIES=true DIST_DIR=out/dist
./art/tools/dist_linux_bionic.sh -j50 showcommands
com.android.runtime.host
is passing
Change-Id: I92d90400c61d3951f6202d932832d0cb63c95a7d
JVM occasionally (0.5% time) crashes on entering a method with SIGSEGV.
It might be due to excessive load on the host machine. Reduce the number
of the compiler threads to 6, and do not start all the GC threads
immediately. If JVM crashes, copy full diagnostics to stderr.
Bug: 132766811
Test: treehugger
Change-Id: Ib7bfd568f6d32456bf623cbb615ffc990c326a34
In the first design, public sysprops have been accessible from Java
modules linking against SDK. But SDK modules shouldn't do, because
sysprop_library isn't for the apps. This renames system to public, so
that only public(System till now) and internal scopes remain from now.
Bug: 131637873
Test: m && sysprop_test
Change-Id: I548007d4a6018922f98d3d13915cee1d66070086
Exported includes have been maintained along with other C/C++ flags.
This makes dependencies unclear, and users have had to parse flags to
get exported directories. This separates exported includes and
exported flags, thus making data more structured and explicit.
Bug: 132818174
Test: m
Change-Id: I5c25ac2224988c4a67e4db6fd6e4d39090b74041