George Burgess IV
d53c27404d
bit: avoid calling strdup(NULL)
...
It seems the behavior of strdup is undefined when NULL is passed in.
Clang's static analyzer complains about this:
> frameworks/base/tools/bit/command.cpp:195:25: warning: Null pointer
passed to 1st parameter expecting 'nonnull'
[clang-analyzer-core.NonNullParamChecker]
Since we don't seem to care about malloc failures (which is a good thing
IMO), adding a second check for the successful completion of `strdup`
seems pointless.
Bug: 206470603
Test: TreeHugger
Change-Id: Ib621659e6fb600203694974f02d96ba0acb3362f
2022-02-22 13:03:04 -08:00
Colin Cross
7cdbd68610
Fix framworks/base compiling against musl
...
Add missing includes that are not transitively provided when compiling
against musl.
Bug: 190084016
Test: m USE_HOST_MUSL=true
Change-Id: Ia22c3df2e904e7a479bb636b7db22e5a0c341b98
2021-09-15 14:59:24 -07:00
Haibo Huang
1c9baa3191
Remove unused errorMessage
...
Change-Id: If799737a69545bf6789213ce3f4dd6c724352213
2021-03-03 16:43:48 -08:00
Haibo Huang
39f4db5ea0
[bit] Use new jsoncpp API
...
Reader / StyledWriter are deprecated upstream
Bug: 170642246
Change-Id: Ia2dcd3a817209e6821ecdd7c7f8094ec74bae44a
2021-03-03 22:17:10 +00:00
Bob Badour
051ef786ac
[LSC] Add LOCAL_LICENSE_KINDS to frameworks/base
...
Added SPDX-license-identifier-Apache-2.0 to:
apct-tests/perftests/autofill/Android.bp
apct-tests/perftests/blobstore/Android.bp
apct-tests/perftests/core/Android.bp
apct-tests/perftests/core/apps/overlay/Android.bp
apct-tests/perftests/core/apps/reources_manager/Android.bp
apct-tests/perftests/core/jni/Android.bp
apct-tests/perftests/multiuser/Android.bp
apct-tests/perftests/multiuser/apps/dummyapp/Android.bp
apct-tests/perftests/packagemanager/Android.bp
apct-tests/perftests/packagemanager/apps/query-all/Android.bp
apct-tests/perftests/textclassifier/Android.bp
apct-tests/perftests/utils/Android.bp
apct-tests/perftests/windowmanager/Android.bp
apex/Android.bp
apex/blobstore/framework/Android.bp
apex/blobstore/service/Android.bp
apex/jobscheduler/framework/Android.bp
apex/jobscheduler/service/Android.bp
apex/media/Android.bp
apex/media/aidl/Android.bp
apex/media/framework/Android.bp
cmds/am/Android.bp
cmds/app_process/Android.bp
cmds/appops/Android.bp
cmds/appwidget/Android.bp
cmds/backup/Android.bp
cmds/bmgr/Android.bp
cmds/bootanimation/Android.bp
cmds/bu/Android.bp
cmds/content/Android.bp
cmds/dpm/Android.bp
cmds/hid/Android.bp
cmds/hid/jni/Android.bp
cmds/idmap2/Android.bp
cmds/ime/Android.bp
cmds/incident/Android.bp
cmds/incident_helper/Android.bp
cmds/incidentd/Android.bp
cmds/input/Android.bp
cmds/interrupter/Android.bp
cmds/locksettings/Android.bp
cmds/pm/Android.bp
cmds/requestsync/Android.bp
cmds/screencap/Android.bp
cmds/sm/Android.bp
cmds/svc/Android.bp
cmds/telecom/Android.bp
cmds/uiautomator/Android.bp
cmds/uiautomator/cmds/uiautomator/Android.bp
cmds/uiautomator/instrumentation/Android.bp
cmds/uiautomator/library/Android.bp
cmds/vr/Android.bp
cmds/wm/Android.bp
config/Android.bp
core/java/android/service/wallpaper/Android.bp
core/jni/Android.bp
core/sysprop/Android.bp
core/tests/BroadcastRadioTests/Android.bp
core/tests/ConnectivityManagerTest/Android.bp
core/tests/PackageInstallerSessions/Android.bp
core/tests/PlatformCompatFramework/Android.bp
core/tests/bandwidthtests/Android.bp
core/tests/benchmarks/Android.bp
core/tests/bluetoothtests/Android.bp
core/tests/bugreports/Android.bp
core/tests/coretests/Android.bp
core/tests/coretests/BinderDeathRecipientHelperApp/Android.bp
core/tests/coretests/BinderProxyCountingTestApp/Android.bp
core/tests/coretests/BinderProxyCountingTestService/Android.bp
core/tests/coretests/BstatsTestApp/Android.bp
core/tests/coretests/DisabledTestApp/Android.bp
core/tests/coretests/EnabledTestApp/Android.bp
core/tests/coretests/aidl/Android.bp
core/tests/coretests/apks/Android.bp
core/tests/coretests/apks/install/Android.bp
core/tests/coretests/apks/install_bad_dex/Android.bp
core/tests/coretests/apks/install_complete_package_info/Android.bp
core/tests/coretests/apks/install_decl_perm/Android.bp
core/tests/coretests/apks/install_jni_lib/Android.bp
core/tests/coretests/apks/install_jni_lib_open_from_apk/Android.bp
core/tests/coretests/apks/install_loc_auto/Android.bp
core/tests/coretests/apks/install_loc_internal/Android.bp
core/tests/coretests/apks/install_loc_sdcard/Android.bp
core/tests/coretests/apks/install_loc_unspecified/Android.bp
core/tests/coretests/apks/install_use_perm_good/Android.bp
core/tests/coretests/apks/install_uses_feature/Android.bp
core/tests/coretests/apks/install_verifier_bad/Android.bp
core/tests/coretests/apks/install_verifier_good/Android.bp
core/tests/coretests/apks/keyset/Android.bp
core/tests/coretests/apks/locales/Android.bp
core/tests/coretests/apks/overlay_config/Android.bp
core/tests/coretests/apks/version/Android.bp
core/tests/coretests/apks/version_nosys/Android.bp
core/tests/featureflagtests/Android.bp
core/tests/hdmitests/Android.bp
core/tests/hosttests/test-apps/AutoLocTestApp/Android.bp
core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v1/Android.bp
core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v2/Android.bp
core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/Android.bp
core/tests/hosttests/test-apps/ExternalLocPermsFLTestApp/Android.bp
core/tests/hosttests/test-apps/ExternalLocTestApp/Android.bp
core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v1/Android.bp
core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v2/Android.bp
core/tests/hosttests/test-apps/ExternalSharedPerms/Android.bp
core/tests/hosttests/test-apps/ExternalSharedPermsBT/Android.bp
core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/Android.bp
core/tests/hosttests/test-apps/ExternalSharedPermsFL/Android.bp
core/tests/hosttests/test-apps/InternalLocTestApp/Android.bp
core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests/Android.bp
core/tests/hosttests/test-apps/NoLocTestApp/Android.bp
core/tests/hosttests/test-apps/NoLocVersionedTestApp_v1/Android.bp
core/tests/hosttests/test-apps/NoLocVersionedTestApp_v2/Android.bp
core/tests/hosttests/test-apps/SharedUid/32/Android.bp
core/tests/hosttests/test-apps/SharedUid/32/jni/Android.bp
core/tests/hosttests/test-apps/SharedUid/64/Android.bp
core/tests/hosttests/test-apps/SharedUid/64/jni/Android.bp
core/tests/hosttests/test-apps/SharedUid/dual/Android.bp
core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.bp
core/tests/hosttests/test-apps/SharedUid/java_only/Android.bp
core/tests/hosttests/test-apps/SimpleTestApp/Android.bp
core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v1_ext/Android.bp
core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v2_int/Android.bp
core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v1_ext/Android.bp
core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v2_none/Android.bp
core/tests/hosttests/test-apps/VersatileTestApp_Auto/Android.bp
core/tests/hosttests/test-apps/VersatileTestApp_External/Android.bp
core/tests/hosttests/test-apps/VersatileTestApp_Internal/Android.bp
core/tests/hosttests/test-apps/VersatileTestApp_None/Android.bp
core/tests/mockingcoretests/Android.bp
core/tests/notificationtests/Android.bp
core/tests/overlaytests/device/Android.bp
core/tests/overlaytests/device/test-apps/AppOverlayOne/Android.bp
core/tests/overlaytests/device/test-apps/AppOverlayTwo/Android.bp
core/tests/overlaytests/device/test-apps/FrameworkOverlay/Android.bp
core/tests/overlaytests/host/Android.bp
core/tests/overlaytests/remount/Android.bp
core/tests/overlaytests/remount/test-apps/Overlay/Android.bp
core/tests/overlaytests/remount/test-apps/SharedLibrary/Android.bp
core/tests/overlaytests/remount/test-apps/SharedLibraryOverlay/Android.bp
core/tests/overlaytests/remount/test-apps/Target/Android.bp
core/tests/packagemanagertests/Android.bp
core/tests/privacytests/Android.bp
core/tests/screenshothelpertests/Android.bp
core/tests/systemproperties/Android.bp
core/tests/utillib/Android.bp
core/tests/utiltests/Android.bp
core/tests/utiltests/jni/Android.bp
core/tests/uwbtests/Android.bp
core/xsd/Android.bp
core/xsd/vts/Android.bp
data/etc/Android.bp
data/etc/car/Android.bp
data/fonts/Android.bp
data/keyboards/Android.mk
drm/jni/Android.bp
errorprone/Android.bp
graphics/proto/Android.bp
keystore/Android.bp
keystore/tests/Android.bp
libs/WindowManager/Jetpack/Android.bp
libs/WindowManager/Shell/Android.bp
libs/WindowManager/Shell/tests/Android.bp
libs/androidfw/Android.bp
libs/androidfw/fuzz/resourcefile_fuzzer/Android.bp
libs/hostgraphics/Android.bp
libs/incident/Android.bp
libs/input/Android.bp
libs/input/tests/Android.bp
libs/protoutil/Android.bp
libs/services/Android.bp
libs/storage/Android.bp
libs/usb/tests/AccessoryChat/Android.bp
libs/usb/tests/AccessoryChat/accessorychat/Android.bp
location/lib/Android.bp
location/tests/Android.bp
location/tests/locationtests/Android.bp
lowpan/tests/Android.bp
media/Android.bp
media/java/Android.bp
media/java/android/media/tv/tunerresourcemanager/Android.bp
media/jni/Android.bp
media/jni/audioeffect/Android.bp
media/jni/soundpool/Android.bp
media/jni/soundpool/tests/Android.bp
media/lib/remotedisplay/Android.bp
media/lib/signer/Android.bp
media/lib/tvremote/Android.bp
media/lib/tvremote/tests/Android.bp
media/mca/filterfw/Android.bp
media/mca/filterfw/native/Android.bp
media/mca/filterpacks/Android.bp
media/mca/samples/CameraEffectsRecordingSample/Android.bp
media/mca/tests/Android.bp
media/native/midi/Android.bp
media/packages/BluetoothMidiService/Android.bp
media/packages/BluetoothMidiService/tests/unit/Android.bp
media/tests/AudioPolicyTest/Android.bp
media/tests/CameraBrowser/Android.bp
media/tests/EffectsTest/Android.bp
media/tests/MediaDump/Android.bp
media/tests/MediaFrameworkTest/Android.bp
media/tests/MediaRouter/Android.bp
media/tests/MtpTests/Android.bp
media/tests/ScoAudioTest/Android.bp
media/tests/SoundPoolTest/Android.bp
media/tests/TunerTest/Android.bp
media/tests/audiotests/Android.bp
media/tests/players/Android.bp
mime/Android.bp
native/android/Android.bp
native/graphics/jni/Android.bp
native/webview/loader/Android.bp
nfc-extras/Android.bp
nfc-extras/tests/Android.bp
packages/AppPredictionLib/Android.bp
packages/BackupEncryption/Android.bp
packages/BackupEncryption/test/robolectric-integration/Android.bp
packages/BackupEncryption/test/robolectric/Android.bp
packages/BackupEncryption/test/unittest/Android.bp
packages/BackupRestoreConfirmation/Android.bp
packages/CarSystemUI/Android.bp
packages/CarrierDefaultApp/Android.bp
packages/CarrierDefaultApp/tests/unit/Android.bp
packages/CompanionDeviceManager/Android.bp
packages/Connectivity/framework/Android.bp
packages/Connectivity/service/Android.bp
packages/CtsShim/Android.bp
packages/CtsShim/build/Android.bp
packages/CtsShim/build/jni/Android.bp
packages/DynamicSystemInstallationService/Android.bp
packages/DynamicSystemInstallationService/tests/Android.bp
packages/EasterEgg/Android.bp
packages/EncryptedLocalTransport/Android.bp
packages/ExtShared/Android.bp
packages/ExternalStorageProvider/Android.bp
packages/ExternalStorageProvider/tests/Android.bp
packages/FakeOemFeatures/Android.bp
packages/FusedLocation/Android.bp
packages/InputDevices/Android.bp
packages/LocalTransport/Android.bp
packages/PackageInstaller/Android.bp
packages/PrintRecommendationService/Android.bp
packages/PrintSpooler/Android.bp
packages/PrintSpooler/jni/Android.bp
packages/PrintSpooler/tests/outofprocess/Android.bp
packages/SettingsLib/ActionBarShadow/Android.bp
packages/SettingsLib/ActionButtonsPreference/Android.bp
packages/SettingsLib/AdaptiveIcon/Android.bp
packages/SettingsLib/Android.bp
packages/SettingsLib/AppPreference/Android.bp
packages/SettingsLib/BarChartPreference/Android.bp
packages/SettingsLib/DisplayDensityUtils/Android.bp
packages/SettingsLib/EntityHeaderWidgets/Android.bp
packages/SettingsLib/HelpUtils/Android.bp
packages/SettingsLib/LayoutPreference/Android.bp
packages/SettingsLib/ProgressBar/Android.bp
packages/SettingsLib/RadioButtonPreference/Android.bp
packages/SettingsLib/RestrictedLockUtils/Android.bp
packages/SettingsLib/SchedulesProvider/Android.bp
packages/SettingsLib/SearchProvider/Android.bp
packages/SettingsLib/SearchWidget/Android.bp
packages/SettingsLib/SettingsSpinner/Android.bp
packages/SettingsLib/SettingsTheme/Android.bp
packages/SettingsLib/Tile/Android.bp
packages/SettingsLib/Utils/Android.bp
packages/SettingsLib/search/Android.bp
packages/SettingsLib/tests/integ/Android.bp
packages/SettingsLib/tests/robotests/Android.bp
packages/SettingsProvider/Android.bp
packages/SharedStorageBackup/Android.bp
packages/Shell/Android.bp
packages/Shell/tests/Android.bp
packages/SimAppDialog/Android.bp
packages/SoundPicker/Android.bp
packages/StatementService/Android.bp
packages/SystemUI/Android.bp
packages/SystemUI/plugin/Android.bp
packages/SystemUI/plugin/ExamplePlugin/Android.bp
packages/SystemUI/plugin_core/Android.bp
packages/SystemUI/shared/Android.bp
packages/VpnDialogs/Android.bp
packages/WAPPushManager/Android.bp
packages/WAPPushManager/tests/Android.bp
packages/WallpaperBackup/Android.bp
packages/WallpaperCropper/Android.bp
packages/overlays/Android.mk
packages/overlays/tests/Android.bp
packages/services/PacProcessor/Android.bp
packages/services/PacProcessor/jni/Android.bp
packages/services/Proxy/Android.bp
proto/Android.bp
rs/jni/Android.mk
samples/demo/haptic-assessment/Android.bp
sax/tests/saxtests/Android.bp
services/Android.bp
services/accessibility/Android.bp
services/appprediction/Android.bp
services/appwidget/Android.bp
services/autofill/Android.bp
services/backup/Android.bp
services/backup/backuplib/Android.bp
services/companion/Android.bp
services/contentcapture/Android.bp
services/contentsuggestions/Android.bp
services/core/Android.bp
services/core/java/com/android/server/vcn/Android.bp
services/core/jni/Android.bp
services/core/xsd/Android.bp
services/core/xsd/vts/Android.bp
services/coverage/Android.bp
services/devicepolicy/Android.bp
services/incremental/Android.bp
services/midi/Android.bp
services/net/Android.bp
services/people/Android.bp
services/print/Android.bp
services/profcollect/Android.bp
services/restrictions/Android.bp
services/robotests/Android.bp
services/robotests/backup/Android.bp
services/systemcaptions/Android.bp
services/tests/PackageManagerComponentOverrideTests/Android.bp
services/tests/PackageManagerServiceTests/host/Android.bp
services/tests/PackageManagerServiceTests/host/test-apps/Android.bp
services/tests/mockingservicestests/Android.bp
services/tests/rescueparty/Android.bp
services/tests/servicestests/Android.bp
services/tests/servicestests/aidl/Android.bp
services/tests/servicestests/apks/Android.bp
services/tests/servicestests/apks/install-split-base/Android.bp
services/tests/servicestests/apks/install-split-feature-a/Android.bp
services/tests/servicestests/apks/install_intent_filters/Android.bp
services/tests/servicestests/apks/install_uses_sdk/Android.bp
services/tests/servicestests/test-apps/ConnTestApp/Android.bp
services/tests/servicestests/test-apps/JobTestApp/Android.bp
services/tests/servicestests/test-apps/PackageParserApp/Android.bp
services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
services/tests/servicestests/test-apps/SimpleServiceTestApp/Android.bp
services/tests/servicestests/test-apps/SuspendTestApp/Android.bp
services/tests/shortcutmanagerutils/Android.bp
services/tests/uiservicestests/Android.bp
services/tests/wmtests/Android.bp
services/usage/Android.bp
services/usb/Android.bp
services/voiceinteraction/Android.bp
services/wifi/Android.bp
startop/apps/test/Android.bp
startop/iorap/Android.bp
startop/iorap/functional_tests/Android.bp
startop/iorap/stress/Android.bp
startop/iorap/tests/Android.bp
startop/view_compiler/Android.bp
startop/view_compiler/dex_builder_test/Android.bp
test-base/hiddenapi/Android.bp
test-mock/Android.bp
test-runner/tests/Android.bp
tests/AccessibilityEventsLogger/Android.bp
tests/AccessoryDisplay/common/Android.bp
tests/AccessoryDisplay/sink/Android.bp
tests/AccessoryDisplay/source/Android.bp
tests/ActivityManagerPerfTests/stub-app/Android.bp
tests/ActivityManagerPerfTests/test-app/Android.bp
tests/ActivityManagerPerfTests/tests/Android.bp
tests/ActivityManagerPerfTests/utils/Android.bp
tests/ActivityTests/Android.bp
tests/ActivityViewTest/Android.bp
tests/AmSlam/Android.bp
tests/ApkVerityTest/Android.bp
tests/ApkVerityTest/ApkVerityTestApp/Android.bp
tests/ApkVerityTest/block_device_writer/Android.bp
tests/AppLaunch/Android.bp
tests/AppLaunchWear/Android.bp
tests/AppResourcesLoaders/Android.bp
tests/AppResourcesLoaders/Overlay/Android.bp
tests/Assist/Android.bp
tests/AutoVerify/app1/Android.bp
tests/AutoVerify/app2/Android.bp
tests/AutoVerify/app3/Android.bp
tests/AutoVerify/app4/Android.bp
tests/BackgroundDexOptServiceIntegrationTests/Android.bp
tests/BandwidthTests/Android.bp
tests/BatteryWaster/Android.bp
tests/BiDiTests/Android.bp
tests/BlobStoreTestUtils/Android.bp
tests/BootImageProfileTest/Android.bp
tests/BrowserPowerTest/Android.bp
tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.bp
tests/CameraPrewarmTest/Android.bp
tests/Codegen/Android.bp
tests/Compatibility/Android.bp
tests/CoreTests/android/Android.bp
tests/DataIdleTest/Android.bp
tests/DozeTest/Android.bp
tests/DpiTest/Android.bp
tests/DynamicCodeLoggerIntegrationTests/Android.mk
tests/FeatureSplit/base/Android.bp
tests/FeatureSplit/feature1/Android.bp
tests/FeatureSplit/feature2/Android.bp
tests/FixVibrateSetting/Android.bp
tests/FlickerTests/Android.bp
tests/FlickerTests/test-apps/Android.bp
tests/FlickerTests/test-apps/flickerapp/Android.bp
tests/FrameworkPerf/Android.bp
tests/GamePerformance/Android.bp
tests/GridLayoutTest/Android.bp
tests/HierarchyViewerTest/Android.bp
tests/HugeBackup/Android.bp
tests/HwAccelerationTest/Android.bp
tests/Internal/Android.bp
tests/JankBench/Android.bp
tests/JobSchedulerPerfTests/Android.bp
tests/JobSchedulerTestApp/Android.bp
tests/LargeAssetTest/Android.bp
tests/LegacyAssistant/Android.bp
tests/LocalizationTest/Android.bp
tests/LocationTracker/Android.bp
tests/LotsOfApps/Android.bp
tests/LowStorageTest/Android.bp
tests/ManagedProfileLifecycleStressTest/Android.bp
tests/ManagedProfileLifecycleStressTest/app/DummyDPC/Android.bp
tests/MemoryUsage/Android.bp
tests/MirrorSurfaceTest/Android.bp
tests/NativeProcessesMemoryTest/Android.bp
tests/NetworkSecurityConfigTest/Android.bp
tests/NullHomeTest/Android.bp
tests/OdmApps/Android.bp
tests/OdmApps/app/Android.bp
tests/OdmApps/priv-app/Android.bp
tests/OneMedia/Android.bp
tests/PackageWatchdog/Android.bp
tests/PlatformCompatGating/Android.bp
tests/PlatformCompatGating/test-rules/Android.bp
tests/ProtoInputStreamTests/Android.bp
tests/RemoteDisplayProvider/Android.bp
tests/RenderThreadTest/Android.bp
tests/RollbackTest/Android.bp
tests/SerialChat/Android.bp
tests/ServiceCrashTest/Android.bp
tests/SharedLibrary/client/Android.bp
tests/SharedLibrary/lib/Android.bp
tests/ShowWhenLockedApp/Android.bp
tests/SmokeTest/Android.bp
tests/SmokeTest/tests/Android.bp
tests/SmokeTestApps/Android.bp
tests/SoundTriggerTestApp/Android.bp
tests/Split/Android.bp
tests/StagedInstallTest/Android.bp
tests/StatusBar/Android.bp
tests/SurfaceComposition/Android.bp
tests/SurfaceControlViewHostTest/Android.bp
tests/SystemMemoryTest/device/Android.bp
tests/SystemMemoryTest/host/Android.bp
tests/SystemUIDemoModeController/Android.bp
tests/TaskOrganizerTest/Android.bp
tests/TelephonyCommonTests/Android.bp
tests/TouchLatency/Android.bp
tests/TransformTest/Android.bp
tests/TtsTests/Android.bp
tests/UiBench/Android.bp
tests/UsageReportingTest/Android.bp
tests/UsageStatsPerfTests/Android.bp
tests/UsageStatsTest/Android.bp
tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp
tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp
tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp
tests/UsbManagerTests/Android.bp
tests/UsbManagerTests/lib/Android.bp
tests/UsbTests/Android.bp
tests/UsesFeature2Test/Android.bp
tests/VectorDrawableTest/Android.bp
tests/VoiceEnrollment/Android.bp
tests/VoiceInteraction/Android.bp
tests/WallpaperTest/Android.bp
tests/WindowAnimationJank/Android.bp
tests/WindowInsetsTests/Android.bp
tests/appwidgets/AppWidgetHostTest/Android.bp
tests/appwidgets/AppWidgetProviderTest/Android.bp
tests/backup/Android.mk
tests/benchmarks/Android.bp
tests/libs-permissions/Android.bp
tests/net/Android.bp
tests/net/common/Android.bp
tests/net/deflake/Android.bp
tests/net/integration/Android.bp
tests/net/jni/Android.bp
tests/net/smoketest/Android.bp
tests/notification/Android.bp
tests/permission/Android.bp
tests/privapp-permissions/Android.bp
tests/testables/Android.bp
tests/testables/tests/Android.bp
tests/utils/StubIME/Android.bp
tests/utils/hostutils/Android.bp
tests/utils/testutils/Android.bp
tests/vcn/Android.bp
tools/aapt/Android.bp
tools/aapt2/Android.bp
tools/aapt2/integration-tests/AutoVersionTest/Android.bp
tools/aapt2/integration-tests/BasicTest/Android.bp
tools/aapt2/integration-tests/MergeOnlyTest/LeafLib/Android.mk
tools/aapt2/integration-tests/MergeOnlyTest/LocalLib/Android.mk
tools/aapt2/integration-tests/NamespaceTest/LibOne/Android.mk
tools/aapt2/integration-tests/NamespaceTest/LibTwo/Android.mk
tools/aapt2/integration-tests/StaticLibTest/App/Android.bp
tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.bp
tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.bp
tools/aapt2/integration-tests/SymlinkTest/Android.bp
tools/bit/Android.bp
tools/codegen/Android.bp
tools/dump-coverage/Android.bp
tools/incident_report/Android.bp
tools/incident_section_gen/Android.bp
tools/lock_agent/Android.bp
tools/locked_region_code_injection/Android.bp
tools/obbtool/Android.bp
tools/powermodel/Android.bp
tools/preload-check/Android.bp
tools/preload-check/device/Android.bp
tools/preload/loadclass/Android.bp
tools/processors/staledataclass/Android.bp
tools/processors/view_inspector/Android.bp
tools/protologtool/Android.bp
tools/sdkparcelables/Android.bp
tools/split-select/Android.bp
tools/streaming_proto/Android.bp
tools/validatekeymaps/Android.bp
wifi/java/Android.bp
wifi/tests/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
libs/hwui/Android.bp
native/webview/plat_support/Android.bp
obex/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
SPDX-license-identifier-CC-BY SPDX-license-identifier-CPL-1.0
SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS
SPDX-license-identifier-W3C legacy_unencumbered
to:
Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
legacy_unencumbered
to:
core/java/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-CPL-1.0
to:
test-base/Android.bp
test-runner/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL
to:
core/res/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0
to:
libs/usb/Android.bp
libs/usb/tests/accessorytest/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
tools/preload/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
SPDX-license-identifier-Unicode-DFS
to:
api/Android.bp
boot/Android.bp
cmds/device_config/Android.bp
cmds/settings/Android.bp
core/api/Android.bp
core/tests/coretests/certs/Android.bp
core/tests/overlaytests/remount/test-apps/certs/Android.bp
core/tests/overlaytests/remount/test-apps/overlaid_apex/Android.bp
core/tests/overlaytests/remount/test-apps/overlay_apex/Android.bp
libs/tracingproxy/Android.bp
services/startop/Android.bp
test-legacy/Android.mk
tests/ApkVerityTest/testdata/Android.bp
tests/TransitionTests/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: Ic44d662936d1ff0cae7fbe915932b37aa4e4869a
Merged-in: I6e9103c3275cb2e6df5dc586588eccd7d2ab6b06
2021-02-16 04:09:57 -08:00
Treehugger Robot
9109c6303d
Merge "Fix clang-analyzer-core.uninitialized.Branch warnings" am: 54ac3c6932 am: 996530f7c1
...
Change-Id: Ic0e0fe3c131c1f9960251204db36a42d2e92035e
2020-04-28 02:08:33 +00:00
Chih-Hung Hsieh
7887035743
Fix clang-analyzer-core.uninitialized.Branch warnings
...
Bug: 154760495
Test: make with WITH_TIDY=1 and DEFAULT_GLOBAL_TIDY_CHECKS=clang-analyzer-core.uninitialized.Branch
Change-Id: I569749166177c25e63b32fb468dccd13797acc05
2020-04-23 14:52:58 -07:00
Joe Onorato
b42201bbd4
[bit] tests live in testcases directory now, not /data
...
Change-Id: I805ec5b6e239bc4044b7f058443639f806b577bd
2019-10-23 12:52:41 -07:00
Joe Onorato
50307d9792
Make am instrument capture logcat during test run, and return it to the host.
...
Also makes bit print that logcat, if available, instead of just the
stack trace.
This means that when you run a test you don't also have to run logcat in
some other window, and then scroll around forever looking for the one
test in question.
Test: bit -t GtsIncidentManagerTestCases:com.google.android.incident.gts.IncidentManagerTests\#testFail
Test: bit -t GtsIncidentManagerTestCases:com.google.android.incident.gts.IncidentManagerTests\#testDoesntExist
Bug: 129875642
Change-Id: I8940ff379c919482f4a545cb90d25bdbaa2b4f15
2019-05-01 13:02:25 -07:00
Joe Onorato
871cf3ec0e
Fix bit crash
...
Change-Id: Ie9314b3d52b9262ac6f964ab833bb36eefb4278f
2019-03-25 14:31:06 -07:00
Joe Onorato
7acae74e9e
Add bit --refresh which updates module-info.json
...
Change-Id: Iacd760442fa45d1e23ce249d51c45f2313d6467c
2019-03-23 16:13:29 -07:00
Joe Onorato
6c97f4908c
Make bit able to run gtest native tests.
...
The output parsing isn't ideal, so these are a bit more spammy
than I'd like, but at least they build, install and run without
the manual glop.
Test: bit incidentd_test
Change-Id: I3c34a4ebbf661f612b4b0f8b4e05cade8669b5a6
2019-02-28 09:20:27 -05:00
Joe Onorato
70edfa8c31
[bit] Use aapt2 instead of aapt, and don't also adb install apps on the system partition
...
Test: bit services
Change-Id: I7d44ffbb2745b1a6265bbc77f24f885e5f1d3981
2019-01-26 09:48:40 -08:00
Joe Onorato
ce0bd06d17
[bit] Cache the build variables so we don't have to run make to figure them out unless the environment has changed.
...
Test: bit GooglePermissionControllerTest:*
Change-Id: Ie79226026477df22115ed1146875b82c2255bdef
2019-01-26 09:48:25 -08:00
Chih-Hung Hsieh
93561ab3b9
Fix/suppress tools google-explicit-constructor warnings
...
* Add explicit to conversion constructors/operators
* Remove redundant explicit of copy constructors
Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: Ic11c22c59beb7aa32b878a23315b1036ca4e3c6a
2019-01-10 19:52:49 +00:00
Greg Kaiser
739d7864e3
Merge "tools/bit: Avoid leak in error condition" am: db43124b01
...
am: b3851d92ce
Change-Id: I6b51d22ee200e11b5a731461f295f5da8937a683
2018-03-29 16:57:00 +00:00
Greg Kaiser
5799d65f12
tools/bit: Avoid leak in error condition
...
In the unlikely event of fread() failing, we want to avoid leaking
our buffer or the file handle.
Test: Treehugger
Change-Id: I1866d00c74ad38af4559d747fee696a60464c9f0
2018-03-26 14:01:38 -07:00
Dan Willemsen
aeff5b880b
Merge "Use soong_ui directly, instead of make" am: e994b4b584 am: 0531e5c647 am: 98fc198f1f
...
am: bfc9e71e0d
Change-Id: I5ef2f58b01632438702ac3bebb19b61000016dfe
2017-10-18 06:33:44 +00:00
Dan Willemsen
bfc9e71e0d
Merge "Use soong_ui directly, instead of make" am: e994b4b584 am: 0531e5c647
...
am: 98fc198f1f
Change-Id: Id17adee4b02cc499261f88c3faed15d889f5b6c3
2017-10-18 06:24:45 +00:00
Dan Willemsen
a40118d7b6
Use soong_ui directly, instead of make
...
This will use ckati instead of make for dumping variables, for
consistent makefile parsing. It may also sandbox executions, etc.
Also skip the legacy make wrapper to build, and use soong_ui instead.
The command line arguments are equivalent, but -j is no longer
necessary, we'll default to a sane value.
Test: bit -b framework
Change-Id: Idc2c9d1abe84b6b783b8702925de5493d47a4509
2017-10-17 17:53:36 -07:00
Joe Onorato
22910ada9a
Merge changes Idf402222,I8eb7e341
...
* changes:
Start auto-generating the stats log API.
Make bit able to build native tests.
2017-10-16 21:19:16 +00:00
Chih-hung Hsieh
decc397b26
Merge "Use -Werror in frameworks/base" am: 16fbd3a1d8 am: 0bfb717a37
...
am: 9f004b1752
Change-Id: I6517ee1689b0247caf830a6c3528bfa9bcf91f75
2017-10-16 19:50:38 +00:00
Joe Onorato
0520afdade
Make bit able to build native tests.
...
It still can't run them. That's a lot of work.
Test: bit statsd_test
Change-Id: I8eb7e341956e698b4e5d110924f78f0485e02f67
2017-10-15 20:25:18 -07:00
Chih-Hung Hsieh
c7edf078f9
Use -Werror in frameworks/base
...
* Fix unused variable and return value warnings.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I890e65a20848d00559ba5a4f9691be1347b456af
2017-10-13 16:25:16 -07:00
Dan Willemsen
2e9ec5f0de
Merge changes I93cf24d4,I32e438ef am: 30798ad13a am: c28d591b36
...
am: 59225490b8
Change-Id: I6cf57e951900b3df816070feee0d3bf92a6a5a7d
2017-09-10 02:05:05 +00:00
Dan Willemsen
d3eac266b0
Convert host tools to Android.bp
...
See build/soong/README.md for more information.
Test: m libinstrumentation interrupter accessorychat accessorytest bit obbtool pbkdf2gen libsplit-select_tests split-select protoc-gen-javastream validatekeymaps libaapt_tests aapt
Test: mmma frameworks/base
Test: out/host/linux-x86/nativetest64/libaapt_tests/libaapt_tests
Test: out/host/linux-x86/nativetest64/libsplit-select_tests/libsplit-select_tests
Change-Id: I93cf24d4b232353a52d53be8ed85781b8f4a3877
2017-09-09 06:18:48 +00:00
Makoto Onuki
6fb2c9718c
Bit: Don't ignore errors and crashes
...
Bit used to only see success results and failures (== assertion failures?),
and didn't see "errors" (other exceptions) and test process crashes.
Fixed it.
Now it also returns an error status code if there was a test failure.
Bug 64292779
Test: manual
Change-Id: Iaba93910d32abfc615ae595746a0e9be1108583a
2017-08-02 14:49:30 -07:00
TreeHugger Robot
41d8ef907a
Merge "Bit: support running all tests in a java package."
2017-07-07 23:28:10 +00:00
Makoto Onuki
164e7967b1
Bit: support running all tests in a java package.
...
If a target name ends with a period, treat it as a package name
and run with "-e package" instead of "-e class".
Test: bit CtsProviderTestCases:android.provider.cts.contacts.
Change-Id: I3a9a0cbef76f57c46c41bf168b7e94eebecaf671
2017-07-06 16:21:26 -07:00
Jeff Sharkey
5f9dc424b3
Have bit grant permissions to installed APKs.
...
Otherwise unit tests fail spectacularly when they don't get the
runtime permissions that they expect.
Bug: 63391323
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Change-Id: I5307e0456865387ac14178268f543e2007b97096
2017-07-06 12:15:21 -06:00
TreeHugger Robot
2c728430a7
Merge "fix warning: Potential leak of memory pointed to by 'target'"
2017-02-11 04:20:43 +00:00
Romain Guy
d973affed2
Compile bit on darwin, use -j when invoking make
...
Test: ran the host tool and checked the output
Change-Id: Idd561139348779982b8c01977fcc18fdfbd0134d
2017-01-11 18:34:57 -08:00
Yunlian Jiang
2cfa849e92
fix warning: Potential leak of memory pointed to by 'target'
...
Bug: None
Test: The warning is gone.
Change-Id: I013fad1d53b37ae3d89846c70f0b10a67a9d04bb
2016-12-13 23:22:57 +00:00
Joe Onorato
6592c3cc8f
Add an option to bit to not restart.
...
Test: build & restart
Change-Id: Ia925053f04046d7fb91a47cfd5fd17a5d4fecf10
2016-11-29 17:36:36 -08:00
Joe Onorato
8e16c1d458
Merge "Another mac fix"
2016-10-21 22:32:34 +00:00
Joe Onorato
31617e3b8f
Another mac fix
...
Test: make (on linux)
Change-Id: I3f0561f3a1fc08dad5d3dd8ba860da56b51d273c
2016-10-21 15:29:51 -07:00
Christopher Ferris
5066f9513b
Merge "Fix mac build."
2016-10-21 22:23:02 +00:00
Joe Onorato
8a5bb6370c
Fix mac build of bit
...
Test: make bit
Change-Id: I8005e77babfbe2d48806f9315800e699d1917bb4
2016-10-21 14:32:01 -07:00
Christopher Ferris
c1ef4b25a7
Fix mac build.
...
Do not build the bit tool on darwin.
Test: Make sure this still builds on linux.
Change-Id: Ie958649893016771f1fa3df6f10d443d0117c171
2016-10-21 12:56:35 -07:00
Joe Onorato
0578cbc6c5
Add a new build, install, test development (bit) tool
...
This is a cleaned up version of a utility that I've had sitting around
for a while.
The bit tool can run an android platform build, then sync or install
the outputs of that, and then run instrumentation tests. It's better
than what we usually do:
make && adb shell stop && adb sync system && adb shell start
Here's the help text:
usage: bit OPTIONS PATTERN
Build, sync and test android code.
The -b -i and -t options allow you to specify which phases
you want to run. If none of those options are given, then
all phases are run. If any of these options are provided
then only the listed phases are run.
OPTIONS
-b Run a build
-i Install the targets
-t Run the tests
PATTERN
One or more targets to build, install and test. The target
names are the names that appear in the LOCAL_MODULE or
LOCAL_PACKAGE_NAME variables in Android.mk or Android.bp files.
Building and installing
-----------------------
The modules specified will be built and then installed. If the
files are on the system partition, they will be synced and the
attached device rebooted. If they are APKs that aren't on the
system partition they are installed with adb install.
For example:
bit framework
Builds framework.jar, syncs the system partition and reboots.
bit SystemUI
Builds SystemUI.apk, syncs the system partition and reboots.
bit CtsProtoTestCases
Builds this CTS apk, adb installs it, but does not run any
tests.
Running Unit Tests
------------------
To run a unit test, list the test class names and optionally the
test method after the module.
For example:
bit CtsProtoTestCases:*
Builds this CTS apk, adb installs it, and runs all the tests
contained in that apk.
bit framework CtsProtoTestCases:*
Builds the framework and the apk, syncs and reboots, then
adb installs CtsProtoTestCases.apk, and runs all tests
contained in that apk.
bit CtsProtoTestCases:.ProtoOutputStreamBoolTest
bit CtsProtoTestCases:android.util.proto.cts.ProtoOutputStreamBoolTest
Builds and installs CtsProtoTestCases.apk, and runs all the
tests in the ProtoOutputStreamBoolTest class.
bit CtsProtoTestCases:.ProtoOutputStreamBoolTest\#testWrite
Builds and installs CtsProtoTestCases.apk, and runs the testWrite
test method on that class.
bit CtsProtoTestCases:.ProtoOutputStreamBoolTest\#testWrite,.ProtoOutputStreamBoolTest\#testRepeated
Builds and installs CtsProtoTestCases.apk, and runs the testWrite
and testRepeated test methods on that class.
Launching an Activity
---------------------
To launch an activity, specify the activity class name after
the module name.
For example:
bit StatusBarTest:NotificationBuilderTest
bit StatusBarTest:.NotificationBuilderTest
bit StatusBarTest:com.android.statusbartest.NotificationBuilderTest
Builds and installs StatusBarTest.apk, launches the
com.android.statusbartest/.NotificationBuilderTest activity.
Change-Id: I9cff7a23852fa1a67369e7807f7ae9f6e45d6131
Test: none
2016-10-20 18:20:40 -07:00