Commit Graph
24 Commits
Author SHA1 Message Date
Lucius Hu e8ee8e30ce removed testfiles for BitBake modules 2020-09-01 16:52:52 -07:00
Patrick McCarty 239d7296d2 pkg_integrity: enable qt package sha256 verification
The new QtIoVerifier class is largely based on GnomeOrgVerifier.

Also add a unit test for the successful verification case.

(Most of qt package tarballs are large, so I picked the smallest one,
qtspeech, which is 98KB.)

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-06-26 01:10:32 -07:00
Arzhan Kinzhalin cd11c14a7d Remove the shared keyring.
Keys now must be stored in the individual packages. autospec will import them
there (as opposed to this central locations). Packages were updated with their
current pub keys where possible.
2018-02-16 08:29:31 -08:00
Matthew Johnson eb4ba41d37 Remove no-longer-used functional test suite
This test suite is extremely hard to keep up-to-date and is no longer as
valuable now that unit tests have been written for much of the code
base. Actual functional testing can be done against package repos
without requiring them to be included in the autospec repository.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-11 14:47:39 -08:00
Gabi Beyer aef3399d10 Refactor to use multiple files and change inputs
Create 3 separate infile files, the infile_handler reads in the
inputs and determnes how to parse them. The --infile argument now
allows a url, file, or directory of files to be passed as the
input. The infile_handler determines that type of input, calls the
correct parser depending on the filetype, and calls the update to
the specfile.

The infile parsers contains the scraping and parsing for all file
types. Currently it scrapes both .bb and .inc files and stores the
data into one dictionary. Because these files are both for recipes
their data corresponds and the .inc file takes presedence.

The infile update spec file udpates aspects of the specfile that
have been scraped and stored into a dict from the infile parsers
file. If there exists a value for ROS_SPN in the .bb file, use that
when replace the ROS_SNP value in the replace PV function.

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer 8b0c5439e5 Initial commit for infile parser
Add --infile argument that takes a url, path, or directory
to a bitbake/recipe file. It scrapes the .bb/.inc file for
configuration data and stores it in a dictionary. This
architecture can be used for multiple file formats.

Also adds some initial unit tests for scraping functionality.

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer e13d3edb03 Remove network dependencies for pkg_integrity test
Create a mock function that copies files from the testfiles
directory to a tmp directory, when attempting to download
files from the network.

Create a mock function for head_request that returns 404 for
a few specified urls, and 200 for the rest.

The mock calls will allow the functionality of the pkg_integrity
program to be tested and not dependent on networking. Tests will
no longer need to be skipped in travis with the removal of
network dependency.

Removed a few tests that were not specific to pkg_integrity, but
instead were testing the importing and exporting abilities
of the gpg key server.

Added mock as a requirement to the requirements.txt file.

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-01 16:58:58 -07:00
Matthew Johnson f3ac7c3a83 Fix test configuration files 2017-04-27 12:58:51 -07:00
Matthew Johnson 33b98ebaba Add option to add all *.so$ files to lib subpackage
The lib_to_so boolean option in options.conf for a specific package
causes files ending with .so to be added to the lib subpackage instead
of the dev subpackage. This is helpful for packages with a plugin
architecture that use .so files as their plugins. Specific examples of
the packages this is helpful for is mesa and elfutils.

Functional tests updated.
2017-04-18 16:48:08 -07:00
Matthew Johnson 5fd6b5d857 Add proxy exports to %build sections
A proxy redirect to localhost prevents package builds from accessing the
internet (they will receive a connection refused). Package build access
to the internet is a security issue if successful, and a very long
timeout if the build is behind an actual proxy.

Update the functional tests to reflect this change.
2017-04-18 10:19:42 -07:00
Matthew Johnson 2ebf8f3212 Update functional tests for version/name detection changes
Update functional tests to reflect the recent version and name detection
changes, such as the addition of the [configuration] section of the
options.conf file.
2017-04-04 17:30:11 -07:00
William Douglas eab12f1589 Add support for manual requires
This patch allows users to specify requires_add and requires_ban to
augment the automatic runtime requirement handling.

As part of this change, the handling of python requires has been
modified so that they are managed under generic requires instead of
their own special mechanism. python requires detection was also improved
by adding install_requires section contents when the section is detected
in setup.py.

The primary change aside from python handling is to remove main_requires
handling in files.py and consolidate requires fully in buildreq.py.
2017-02-23 17:57:48 +00:00
Matthew Johnson 13e16210aa Update c-helloworld-opts test case for security flag 2017-02-16 15:36:28 -08:00
Matthew Johnson 87900c8381 Fix tests for several recent changes
Changes have been pushed recently that require testing updates. This
patch updates the configuration file and spec file expectations for the
functional tests.
2017-02-07 09:42:37 -08:00
Matthew Johnson 62adde9cf1 Add reproducible build bits to functional tests 2017-01-19 11:14:39 -08:00
William Douglas b45aaa78d0 Update python functional tests
Update tests for python due to python3 versions being built by default.
2017-01-09 22:32:21 +00:00
Matthew Johnson fcf7f8a1b5 Add verify_required config option and set after verify
verify_required requires the package to be verified for the build to
continue. If a package is ever verified, this configuration is
automatically set to prevent future regressions. If a regression does
occur in the future but there is a valid reason, a developer must
manually unset the verify_require flag to build the package. This is a
safety mechanism.
2017-01-05 15:39:06 -08:00
Matthew Johnson 8652501f0c Update test case to reflect enabled fat LTO objects
Reflects change from commit 4565ac0.
2016-12-28 12:35:03 -08:00
Matthew Johnson e34771c7a9 Use epoch time for reproducible build env variable
Instead of using the date the configure file was modified, use the UNIX
epoch time for the SOURCE_DATE_EPOCH environment variable. This allows
reproducible package binaries per autospec build.

Functional tests updated to match change and 'unittest' make target
added to ease testing.
2016-12-27 13:05:39 -08:00
Matthew Johnson 1770373aa0 Update test case for latest 32bit tweak 2016-12-14 14:32:39 -08:00
Matthew Johnson f0e64eee2c Add test case for 32 bit library support
Add test case (c-helloworld-32) to test 32-bit library support and
update other tests for newest configuration option introduced.
2016-12-12 10:46:48 -08:00
William Douglas 318a1087e6 Update cmake build requirement
The cmake package was reworked to move cmake modules out of the
cmake-dev subpackage. This change just restores autospec to not add
cmake-dev to any cmake pattern's BuildRequires.
2016-12-06 22:32:09 +00:00
Matthew Johnson a9ff5fce7d Print README.clear file from autospec directory
Previously we were printing the README.clear contents from the tarball
directory (my fault) instead of the autospec directory. Print from
correct directory and update tests to check output for README.clear
output.
2016-11-28 16:01:06 -08:00
Matthew Johnson 90b3942927 Standardize testing invocation and structure
This involves moving the tests to the top-level tests/ directory, adding
a Makefile target (make test_autospec) to run the functional tests, and
adding a tests/README.rst to explain the various testing files and test
structure.
2016-11-28 14:57:40 -08:00