ArchiveIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Update AbstractArchiveTask to expose Provider API

Before this change, there was no easy way to rely upon the output

of the AbstractArchiveTask without using dependsOn.

Related: https://github.com/gradle/gradle-native/issues/893

Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@plexxi.com>

  1. … 5 more files in changeset.
Make AbstractArchiveTask.destinationDir mandatory

Prior to this commit the working directory was used when the

`destinationDir` was not set. Since this behavior does not play nice

with reproducible builds, it will now fail instead. However, it should

rarely happen because the `base` plugin provides a convention.

  1. … 26 more files in changeset.
Make AbstractArchiveTask.destinationDir mandatory

Prior to this commit the working directory was used when the

`destinationDir` was not set. Since this behavior does not play nice

with reproducible builds, it will now fail instead. However, it should

rarely happen because the `base` plugin provides a convention.

  1. … 26 more files in changeset.
Finalize the value of any task `@Input` property whose getter returns a property instance, at the start of execution of the task.

This means that the property value will not change once the task has started execution, so that the same value is always used during fingerprinting, cache key calculation, validation, when queried by a task action, and so on.

This behaviour only applies to `@Input` properties in this commit. This was just a place to start. Other properties will be added in later commits.

Changes to the property are ignored once the value is finalized implicitly in this way and generate a deprecation warning instead of failing, as would happen after `finalizeValue()` is called. This allows a migration path for task types that can add a new property to represent some input and keep their existing lenient (but now deprecated) behaviour for an existing property backed by the new property. It might prove better to flip this around, let's see.

  1. … 61 more files in changeset.
Revert "Fix integration tests"

This reverts commit 0cb871df611096494ae24cd9b3a57ab8d1d9e3b1.

  1. … 4 more files in changeset.
Fix integration tests

  1. … 4 more files in changeset.
Add reproducibleArchives property to tests

  1. … 1 more file in changeset.
Create invalid tar file in test

  1. … 1 more file in changeset.
Use directory walker for reproducible archives

Instead of sorting the files after reading them from disk we

use `ReproducibleDirectoryWalker` to directly read them from disk in

a reproducible way independent of the file system.

This has the advantage that we do not add some special handling for

zipTree and tarTree. It probably has some performance impact when

having walking the file system but the impact should actually be

less than sorting afterwards since we sort smaller lists and we do

not need to keep all the file names in an archive in memory.

  1. … 28 more files in changeset.
Run more tests with reproducible archives on

  1. … 11 more files in changeset.
Clean up existing archive integration test

Remove extraneous escaping

Added rename { null } case to integration tests

+review REVIEW-6270

  1. … 1 more file in changeset.
Removed unused setup from test.

GRADLE-3310 Add test coverage for regression

+review REVIEW-5537

  1. … 6 more files in changeset.
Don't scrape build failure from output.

REVIEW-2446: remove duplicate zip related tests; minor cleanup

  1. … 2 more files in changeset.
Extracted a common superclass for the archive test fixtures.

  1. … 4 more files in changeset.
fix failing test + testfixture

  1. … 1 more file in changeset.
fix rebasing conflicts

Remove accidentally committed test.

Rename ReadableCopySpec to CopySpecInternal and mark CopySpec as having an internal protocol.

In CopySpecImpl we expect all CopySpec instances to implement this, therefore always requiring this internal protocol.

  1. … 19 more files in changeset.
REVIEW-2521: Some cleanup on archive test fixtures;

- Replace TarTarInputStream instead of TarFileTree (remove core dependency in internal-integ-testing)

- rework ZipTestFixture

- reuse ZipTestFixture in JarTestFixture

- verify service type and service impl in jar files

  1. … 5 more files in changeset.
cleanup some archive related tests

- REVIEW-2446/REVIEW-2451: Add more assertions to the duplicateStrategy integration tests

- REVIEW-2446: fix assertZipContainsOnly and move to ZipTestFixture

- REVIEW-2446: create explicit TarTestFixture

- REVIEW-2446: create explicit JarTestFixture and close jarFile properly

  1. … 6 more files in changeset.
Gradle-2171: add test coverage for renamed files in copy and archive task.

  1. … 1 more file in changeset.
GRADLE-2171: verify that first entry (of duplicate entries) is copied and not last one.

GRADLE-2171: Added DuplicatesStrategy allowing duplicate files (based on their path) to be included or excluded, by default for an entire copy operation or on a per-file basis

- duplicatesStrategy field to FileCopyDetails so individual files

can specify their own strategy for handling duplicates

- add duplicatesStrategy field to CopySpec so that an entire copy

spec can specify the default strategy (this can be overridden

for some or all files)

- add CopySpec.matching and .notMatching convenience

methods. These let the user modify a group of FileCopyDetails

simultaneously. Motivated by setting a duplicatesStrategy for

eg, "META-INF/**/*.xml" but is generally useful

- added CopySpec.duplicatesPriority that determines precedence

among CopySpecs when a duplicate file is to be

excluded. Plugins can set a higher duplicatesPriority for some

specs (eg, Jar.manifest and Jar.metaInf), but this property is

not currently user-settable.

  1. … 23 more files in changeset.
GRADLE-2171: Added DuplicatesStrategy allowing duplicate files (based on their path) to be included or excluded on a per-file basis

  1. … 11 more files in changeset.
REVIEW-1299: some more tweaks on Zip compression support

- use deflate as a default (as done in previous gradle versions)

- fix javadoc (mixed up DEFLATE and STORE)

- renamed Zip.contentCompression -> Zip.entryCompression

- renamed Compressor to ArchiveOutputStreamFactory

- renamed ContentsCompression to ZipEntryCompression

- removed ZipOutputStream.setMethod in ZipCopySpecVisitor

  1. … 19 more files in changeset.
merge pull request 120

  1. … 14 more files in changeset.