test: scanner: Cache archives #1036
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes creates condensed versions of the archives referenced by the files
in
test/test_data/
. We addmake_condensed_from_download()
withintest_scanner.py
which takes an archive URL and runs strings on everythingidentified as a binary within the archive. We create fake binaries just as we do
with the mapping data tests and add those to an archive which we store within
our git repo at
test/condensed-downloads/
Commits:
version scanner: Create separate method,
run_checkers()
for running checkerstest: scanner: Cache downloads and condense them
For
test_version_in_package()
where we test against a lot of URLs, weconsistently have issues downloading those URLs. Instead of adding all
the files we are downloading to test the scanner on to the git repo,
we've run the recursive extraction and strings and created condensed
versions of the URLs contents.
We will now be able to add these condensed files to our Git repo to
increase speed and stability of testing.
Users adding new tests should commit the added files that appear in
test/condensed-downloads/. Since that is the condensed version of the
URL for the test they've added.
Add test/downloads/ to the .gitignore
test: condensed downloads: Add all the archives to the cache folder