Documentation

Overview

    Package artifacts contains utility functions to download and unarchive Autotest build artifacts.

    These artifacts are usually built during Continuous Integration builds and uploaded to Google Cloud Storage.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func ExtractControlFiles

    func ExtractControlFiles(paths LocalPaths, outdir string) error

      ExtractControlFiles extracts Autotest control files from build artifacts downloaded locally.

      On success, outdir contains the unarchived control files.

      Types

      type LocalPaths

      type LocalPaths struct {
      	// Path to test_suites.tar.bz2
      	// This archive contains the test suite control files and is ~4 MiB.
      	TestSuitesArchive string
      	// Path to downloaded control_files.tar
      	// This archive contains the test control files and is ~10 MiB
      	ControlFilesArchive string
      }

        LocalPaths points to locally downloaded copies of Autotest build artifacts.

        func DownloadFromGoogleStorage

        func DownloadFromGoogleStorage(ctx context.Context, client gs.Client, remoteDir gs.Path, outDir string) (LocalPaths, error)

          DownloadFromGoogleStorage downloads autotest artifacts required to compute test metadata from the Google Storage folder remoteDir to local outDir.

          This function returns the local paths to the downloaded artifacts.