Skip to content
  1. Dec 09, 2019
  2. Dec 07, 2019
  3. Dec 06, 2019
    • Jeff Sharkey's avatar
    • Elliott Hughes's avatar
      b5d11197
    • Colin Cross's avatar
      Move ImageMutator after archMutator · ae6c5207
      Colin Cross authored
      Move the ImageMutator to be registered just after the archMutator
      in preparation for moving it between osMutator and archMutator.
      Requries updating variants in a few tests that now run the
      ImageMutator.
      
      Bug: 142286466
      Test: no change to build.ninja
      Test: all soong tests
      Change-Id: Ia9d2a7bc0e225bedec3c9a83ea04f471a931bf47
      ae6c5207
    • Treehugger Robot's avatar
      f3c24c12
    • Dan Willemsen's avatar
      ad1997ee
    • Ulyana Trafimovich's avatar
    • Paul Duffin's avatar
      Cleanup java.DefaultsFactory() · 4735766e
      Paul Duffin authored
      This function took a props varargs parameter but it was only ever
      called with no parameters. The props parameter meant it could not be
      used directly with RegisterModuleType() so the defaultsFactory() func
      was added which simply called through to DefaultsFactory().
      
      Removing the props varargs parameter allowed it to be used directly
      with RegisterModuleType() and so the defaultsFactory() could be
      removed.
      
      This was needed because a follow up change adds a test in another
      package that uses java_defaults and so it needs the factory method
      (defaultsFactory()) to be exported.
      
      Test: m nothing
      Change-Id: I33d5c4d4ce8f349b1e6fc706d5e9656faf303b4f
      4735766e
    • Paul Duffin's avatar
      Support header and implementation jars in sdk · a0dbf43a
      Paul Duffin authored
      Add a new java_header_libs property that exports header jars (as
      java_libs currently does) and switch java_libs to export implementation
      jars instead.
      
      Refactors implementation of the existing library sdk member type so
      both properties can be supported from common code as they differ only
      on the jar being exported.
      
      Bug: 143678475
      Test: m nothing
      Change-Id: I04642122f72d083bbdfd3290624f957b71ee8875
      a0dbf43a
    • Paul Duffin's avatar
      Separate out module type specific test config · d835daaa
      Paul Duffin authored
      Bug: 143678475
      Test: m conscrypt-module-sdk
      Change-Id: I71433a7c89dfae4c27537f1f66bd677cf9fba0b3
      d835daaa
    • Treehugger Robot's avatar
      Merge changes Ia7dbcd41,I93140450,I4d3fe18f,Ib00870dd,I10203594 · 3a7caaa8
      Treehugger Robot authored
      * changes:
        Organize sdk member properties
        Extract the cc and java sdk related tests out into their own file
        Improve testing of sdk snapshot generation
        Separate sdk testing infrastructure from sdk tests
        Parameterize the sdk member processing
      3a7caaa8
    • Paul Duffin's avatar
      7467a714
    • Jeongik Cha's avatar
      Link type checking for java_library · e403e9e8
      Jeongik Cha authored
      Link type checking for java_library has not been working unintentionally.
      So turn on link type checking for these types.
      
      And also add tests for link type checking.
      
      Bug: 145799020
      Test: cherry-pick aosp/1182522 and check if build fails
      Test: m nothing and there is no error(soong unittest)
      
      Change-Id: Ifc347f657885de1028ac0076ddd103c0387b597a
      e403e9e8
    • Anton Hansson's avatar
      Revert "Move odexes of non-system apps into system_other" · d57bd3c8
      Anton Hansson authored
      This reverts commit 12b8d427.
      
      Bug: 142537657
      Test: No
      Change-Id: Iefd882ec11c060877671f5bf0f2429ba4d811f8b
      Merged-In: Iefd882ec11c060877671f5bf0f2429ba4d811f8b
      d57bd3c8
    • Ulya Trafimovich's avatar
      Pass correct --image argument to oatdump. · 163664a5
      Ulya Trafimovich authored
      This was broken after CL:
        Ida40dfae8c83bf7c2e737d5c7ea418e1197ad826
      ..which split boot image into primary and extension.
      The argument to oatdump was not updated properly.
      
      The old form before the split was:
      
        --image=out/soong/generic_x86/dex_bootjars/system/framework/boot.art
      
      The new form after the split is:
      
        --image=out/soong/generic_x86/dex_artjars/apex/com.android.art/javalib/boot.art:out/soong/generic_x86/dex_bootjars/system/framework/boot-framework.art
      
      Test: lunch aosp_x86-userdebug && m dump-oat
      
      Test: Manually inspect build command to make sure correct image
        location is used:
      
        $ fgrep -e 'oatdump' $ANDROID_BUILD_TOP/out/soong/build.ninja | egrep -e '--image[^ ]*' -o
        --image=out/soong/generic_x86/dex_artjars/apex/com.android.art/javalib/boot.art:out/soong/generic_x86/dex_bootjars/system/framework/boot-framework.art
      
      Change-Id: I54a5146c404aefb6eaeadbe3e9363db935ecad86
      163664a5
    • Paul Duffin's avatar
      Organize sdk member properties · a6e737b0
      Paul Duffin authored
      Grouping in alphabetical order by package and then by name within the
      package should minimize conflicts when making changes.
      
      Bug: 143678475
      Test: m conscrypt-module-sdk
      Change-Id: Ia7dbcd41ce8b8dd8675a90b1b6868fcaeaf72ee4
      a6e737b0
    • Paul Duffin's avatar
      Extract the cc and java sdk related tests out into their own file · a80fdec0
      Paul Duffin authored
      Makes it easier for multiple people to work on different areas without
      conflicts.
      
      Bug: 143678475
      Test: m conscrypt-module-sdk
      Change-Id: I93140450c0b049946a9d0432225bccff82f5a873
      a80fdec0
    • Paul Duffin's avatar
      Improve testing of sdk snapshot generation · c3c5d5e3
      Paul Duffin authored
      Adds TestHelper to provide general test helper functionality for use by
      any test.
      
      Adds testSdkResult, composed with TestHelper that encapsulates the
      result of processing and sdk {..} definition and provides specialized
      support for testing the build rules.
      
      Dedups the analysis of the sdk build rules, and improves it to extract
      more information, and in different forms. That is represented by the
      snapshotBuildInfo struct.
      
      Adds a CheckSnapshot() method which checks the snapshot for a specified
      sdk version. It takes a list of functions that can each perform a check
      on a specific facet of the supplied snapshotBuildInfo.
      
      Methods are provided for tests to use to check the following facets:
      * Generated Android.bp contents.
      * Copy rules
      * Merge zip inputs
      
      This approach makes it possible for each test to customize what is
      being checked without either duplicating functionality, causing a
      proliferation of specialized forms of the CheckSnapshot method for
      different types of tests or adding arguments for every possible check
      that any test would need which would lead to lots of churn to existing
      tests when new arguments are added.
      
      The main testing improvement is for CheckSnapshot() to actually try and
      load the Android.bp that is generated. In order to do that it was
      necessary to create a mock filesystem populated with information from
      the build rules, i.e. the destination files from every Cp command as
      well as the destination directory from every repackage zip command.
      
      That helps detect a number of sources of errors:
      * Failing to copy a file/directory that is mentioned in the generated
        Android.bp file.
      * Invalid properties.
      * Invalid format of the .bp file.
      * Integrity issues within the .bp file.
      
      Bug: 143678475
      Test: m conscrypt-module-sdk
      Change-Id: I4d3fe18f86698186d18e7e8b32d2e319183f7f0c
      c3c5d5e3
    • Paul Duffin's avatar
      Separate sdk testing infrastructure from sdk tests · 82d90438
      Paul Duffin authored
      Bug: 143678475
      Test: m conscrypt-module-sdk
      Change-Id: Ib00870ddefc4c1dd9e42ca594e6ebe8e24c42e05
      82d90438
    • Paul Duffin's avatar
      Parameterize the sdk member processing · 13879577
      Paul Duffin authored
      Extracts the type specific functionality into the SdkMemberType
      interface which has to be implemented by each module type that can
      be added as a member of the sdk. It provides functionality to add
      the required dependencies for the module type, check to see if a
      resolved module is the correct instance and build the snapshot.
      
      The latter was previously part of SdkAware but was moved because
      it has to be able to process multiple SdkAware variants so delegating
      it to a single instance did not make sense.
      
      The custom code for handling each member type specific property,
      e.g. java_libs, has been replaced with common code that processes
      a list of sdkMemberListProperty struct which associates the
      property (name and getter) with the SdkMemberType and a special
      DependencyTag which is passed to the SdkMemberType when it has to add
      dependencies.
      
      The DependencyTag contains a reference to the appropriate
      sdkMemberListProperty which allows the resolved dependencies to be
      grouped by type.
      
      Previously, the dependency collection methods would ignore a module if
      it was an unsupported type because they did not have a way of
      determining which property it was initially listed in. That meant it
      was possible to add say a droidstubs module to the java_libs property
      (and because they had the same variants) it would work as if it was
      added to the stubs_sources property. Or alternatively, a module of an
      unsupported type could be added to any property and it would just be
      ignored.
      
      However, the DependencyTag provides information about which property
      a resolved module was referenced in and so it can detect when the
      resolved module is of the wrong type and report an error. That check
      identified a bug in one of the tests where the sdk referenced a
      java_import module (which is not allowed in an sdk) instead of a
      java_library module (which is allowed). That test was fixed as part
      of this.
      
      A list of sdkMemberListProperty structs defines the member properties
      supported by the sdk and are processed in order to ensure consistent
      behaviour.
      
      The resolved dependencies are grouped by type and each group is then
      processed in defined order. Within each type dependencies are grouped
      by name and encapsulated behind an SdkMember interface which includes
      the name and the list of variants.
      
      The Droidstubs and java.Library types can only support one variant and
      will fail if given more.
      
      The processing for the native_shared_libs property has been moved into
      the cc/library.go file so the sdk package code should now have no type
      specific information in it apart from what is if the list of
      sdkMemberListProperty structs.
      
      Bug: 143678475
      Test: m conscrypt-module-sdk
      Change-Id: I10203594d33dbf53441f655aff124f9ab3538d87
      13879577
    • Paul Duffin's avatar
      Use static build rules in snapshot generation · 375058f6
      Paul Duffin authored
      It is easier to extract information out of static build rules than it
      is out of custom build rules built using the builder as the former
      provides access to the in/out and args separate from the rule whereas
      the latter only provides access to in/out.
      
      Also, cleans up some warnings that appear in Intellij.
      
      There is a lot of duplication in the testing code. That will be
      resolved in a follow up change.
      
      Bug: 143678475
      Test: m conscrypt-module-sdk
      Change-Id: I973bc0c90b0affd84487f1b222dd3e6c22c07ec0
      375058f6
    • Treehugger Robot's avatar
      Merge "apex_available is defaultable" · cea93afe
      Treehugger Robot authored
      cea93afe
    • Dan Willemsen's avatar
      Add sharding support to multiproduct_kati · 9609ad9c
      Dan Willemsen authored
      This is so that we can split the build_test build on large branches into
      multiple builds, each testing a subset of the products.
      
      Test: m blueprint_tools  (runs the go unit tests)
      Test: build/soong/build_test.bash --only-config
            vs
      Test: build/soong/build_test.bash --only-config --shard-count=2
      Test: build/soong/build_test.bash --only-config --shard-count=2 --shard=2
      
      Change-Id: I40ccc1aa477bc0ffa74ff564d155068509be18f0
      9609ad9c
    • Ivan Lozano's avatar
      1fdb0b55
    • Treehugger Robot's avatar
    • Treehugger Robot's avatar
      Merge "Add CUJ tests" · 6cfd3f03
      Treehugger Robot authored
      6cfd3f03
  4. Dec 05, 2019
Loading