summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: tests: Add test for possible gitsm deadlockPavel Zhukov2022-09-011-0/+9
| | | | | | | (Bitbake rev: b0506480baa9bcf3ef645b0aed5a07ad9950245c) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests: Add Timeout classPavel Zhukov2022-09-011-0/+19
| | | | | | | | | | | | | The class and exception aim to test rare cases there deadlocks are possible. Can be used in context managers: with Timeout(<value>): do_deadlock() (Bitbake rev: c5fcdd804d422f959a189b270d72123a50e74da6) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: BBHandler/cooker: Implement recipe and global classesRichard Purdie2022-08-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We have some confusion for users since some classes are meant to work in the configuration space (or "globally") and some are meant to be selected by recipes individually. The cleanest way I could find to clarify this is to create "classes-global" and "classes-recipe" directories which contain the approproate classes and have bitbake switch scope between them at the appropriate point during parsing. The existing "classes" directory is always searched as a fallback. Once a class is moved to a specific directory, it will no longer be found in the incorrect context. A good example from OE is that INHERIT += "testimage" will no longer work but IMAGE_CLASSES += "testimage" will, which makes the global scope cleaner by only including it where it is useful and intended to be used (images). (Bitbake rev: f33ce7e742f46635658c400b82558cf822690b5e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Add copyright headers where missingRichard Purdie2022-08-122-0/+4
| | | | | | | | | Where copyright headers were not present, add them to make things clear. (Bitbake rev: 1aa338a216350a2751fff52f866039343e9ac013) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Drop DL_DIR fallback for local file fetcherRichard Purdie2022-07-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | A long time ago, we made DL_DIR a final fallback for the local fetcher. Since then we added checksum support and task hashes and the world has changed. There were warnings added some time ago if this fallback triggers and it is now time to drop it entirely. The original use case was for sstate however the sstate code now sets FILESPATH correctly so DL_DIR is no longer needed. There have been a few small bugs exposed by this change, missing mkdir calls and some minor test issues that needed tweaks. In general this simplifies and improves the fetcher code flow though. This completes a cleanup that ensures local files are correctly covered at parse time which ensures rebuilds and reparses happen at the right times. (Bitbake rev: 3e1444e536c71d3885ef6b9d428807163c309640) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: bb.fatal when trying to checksum non-existing filesPaulo Neves2022-07-151-0/+5
| | | | | | | | | | | | If the local fetcher was not able to find the file anywhere but it was included in the SRC_URI for checksumming just make it a fatal error. Ensure a list of searched locations is included too to match the runtime error that would have resulted. (Bitbake rev: 5e3b2ad90d9cd0f248b1cb740637caa24442d101) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ConfHandler/BBHandler: Improve comment error messages and add testsRichard Purdie2022-07-041-0/+23
| | | | | | | | | | | | | | | | | | | Currently if you trigger one of the comment errors, the newline characters are stripped and the line numbers are incorrect. In one case it prints the empty line which is also unhelpful. Rework the code around these errors so the line numbers are correct and the lines in question are more clearly displayed complete with newlines so the user can more clearly see the error. I also added a couple of simplistic test cases to ensure that errors are raised by the two known comment format errors. [YOCTO #11904] (Bitbake rev: 712da71b24445c814d79a206ce26188def8fce0a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Add test for broken mirror tarballPavel Zhukov2022-06-211-0/+25
| | | | | | | | | | | | | | | With PREMIRRORS set and BB_NO_NETWORK = "1" bitbake should not try to fetch into non-initialized git directory if tarball is broken (or not in gzip format) [Yocto 14822] (Bitbake rev: c9aaca3dd2dfdf4a291d6e1f6263037e0f54b4b6) Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Add tests for premirror using real projectPavel Zhukov2022-06-111-0/+39
| | | | | | | | | | | Existing test uses fake local repo for better performance. Adding test which uses real (but still small) project hosted on yoctoproject.org. (Bitbake rev: 247f3536a691cdaa3f96768d1b42653b1da9ae84) Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Drop unnecessary duplicated functionPavel Zhukov2022-06-111-9/+0
| | | | | | | | | Function "git" is defined in super class FetcherTest already. (Bitbake rev: bfed4ad2d50bcd635bb2ef99977e03e879fc79a2) Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Add tests to cover BB_FETCH_PREMIRRORONLY functionalityPavel Zhukov2022-06-081-0/+63
| | | | | | | | | | | | Basic test to cover functionality of BB_FETCH_PREMIRRORONLY using local git repository. Local repository has been chosen to allow easy manipulation with the repo to simulate behaviour reported in [Yocto 13233] (Bitbake rev: 773e0815ba0c2183afcb169cda525b7625e60e42) Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/parse: Fix one test overwriting anotherRichard Purdie2022-04-211-1/+1
| | | | | | | | | Fix an issue where two tests have the same name with one overwriting the other. (Bitbake rev: da812d938fd79e2cc7bdf355ccf5b0f9ead684c4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: canonicalize ids in generated tarballsOlaf Mandel2022-04-141-2/+4
| | | | | | | | | | | | | | Change the owner information in the mirror tarballs generated using BB_GENERATE_MIRROR_TARBALLS="1". This is an extension of commit 0178ab83, which used the original pokybuild:user information, but failed to clean up the numerical user and group ids. Now set the more canonical values of oe:oe and 0:0. (Bitbake rev: 37437115d3fb1a9f5d8ed7356a0fc01a408e4f8c) Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> CC: Marek Vasut <marex@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data: Ensure vardepsexclude or BB_BASEHASH_IGNORE_VARS covers ↵Richard Purdie2022-04-031-5/+23
| | | | | | | | | | | | | | contains items Adding bb.utils.filter('WARN_QA', 'patch-fuzz', d) when WARN_QA is in BB_BASEHASH_IGNORE_VARS or in vardepsexclude should not add a dependency on WARN_QA. Fix it and add some tests. (Bitbake rev: 6aecc2fe51a52020f6f13be08449e18d42e7a6b5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: stop generated tarballs from leaking infoOlaf Mandel2022-03-261-0/+30
| | | | | | | | | | | | | | | | | | | | When using BB_GENERATE_MIRROR_TARBALLS="1" to generate mirror tarballs of git repositories, they leaked local information: username, group and time of the last fetch. Remove all these by setting fixed information: * uname = pokybuild * gname = users * mtime = committer time of newest commit in repo The username and group value were taken from the archives available on the downloads.yoctoproject.org mirror. The modification time is chosen so it still retains some relationship to the contents of the archive. (Bitbake rev: 0178ab83e6312e97e528aa8c5e12105f5165d896) Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Update for master -> main change upstreamRichard Purdie2022-02-231-1/+1
| | | | | | (Bitbake rev: f0fc0fe94161d4dd4f34df8426222ac590ef6736) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Rename setscene enforce filtering variableScott Murray2022-02-211-2/+2
| | | | | | | | | | | | | | | | | In line with the inclusive language migration defined at: https://wiki.yoctoproject.org/wiki/Inclusive_language rename: BB_SETSCENE_ENFORCE_WHITELIST -> BB_SETSCENE_ENFORCE_IGNORE_TASKS (Bitbake rev: 2e243ac06581c4de8c6e697dfba460ca017d067c) (Bitbake rev: f8f7b80a0df4646247e58238a52a7d85a37116d4) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Rename environment filtering variablesScott Murray2022-02-211-2/+2
| | | | | | | | | | | | | | | | | | In line with the inclusive language migration defined at: https://wiki.yoctoproject.org/wiki/Inclusive_language rename: BB_ENV_WHITELIST -> BB_ENV_PASSTHROUGH BB_ENV_EXTRAWHITE -> BB_ENV_PASSTHROUGH_ADDITIONS (Bitbake rev: fe60627839d4280cf0117ed1afbfccdff1181b6a) (Bitbake rev: 87104b6a167188921da157c7dba45938849fb22a) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Rename basehas and taskhash filtering variablesScott Murray2022-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | In line with the inclusive language migration defined at: https://wiki.yoctoproject.org/wiki/Inclusive_language rename: BB_HASHBASE_WHITELIST -> BB_BASEHASH_IGNORE_VARS BB_HASHTASK_WHITELIST -> BB_TASKHASH_IGNORE_TASKS the derived code variables basewhitelist and taskwhitelist have been renamed to basehash_ignore_vars and taskhash_ignore_tasks, respectively. [RP: Added compatibility mapping code and tweaked naming] (Bitbake rev: efaafc9ec2e8c0475e3fb27e877a1c0a5532a0e5) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/cooker: Fix source revision handling with floating upstreamsRichard Purdie2022-02-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Where a git url uses a tag instead of a full source revision, breakage can currently occur in builds. Issues include: * the revision being looked up in multiple tasks (fetch and unpack) * the risk a different revision may be obtained in those tasks * that some tasks may not be allowed to access the network * that a revision may not be consistent throughout a given build * rerunning a specific task may given inconsistent results To fix this, stop the workers from cleaning out the source revision store. This should only be done in the cooker itself (based on current policy). Also, where the code "sees" an upstream access, mark the recipe as not to be cached. The reparse re-triggers the upstream lookup by the server. Add a test to ensure that if get_srcrev isn't called, the user is told they're using a configuration that is known to break. (Bitbake rev: 4b5eed1626709ef3dc06b32fd55d40a2a6edd179) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Add missing branch param for git urlsRichard Purdie2022-02-121-44/+44
| | | | | | | | | We started to require the branch parameter for git urls. This updates the tests to match and quieten some noise. (Bitbake rev: e5144887f2b6ae266f7b52151005619480e80ec6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: npm: Put all downloaded files in the npm2 directoryPeter Kjellerstedt2022-02-051-1/+1
| | | | | | | | | | | | | Previously npm files that specify downloadfilename= in the SRC_URI would be downloaded to the root of ${DL_DIR} rather than in the ${DL_DIR}/npm2 directory where all other npm files are downloaded. This should make it simpler when setting up and configuring a premirror with the downloaded npm packages. (Bitbake rev: 73fa376d6502ab6f2cccfb25a1193d9b1c3c3bc8) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Correct handling of replacing the basename in URIsPeter Kjellerstedt2022-02-051-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The solution implementated in commit 96c30007 (fetch2: fix downloadfilename issue with premirror) missed two corner cases. The first is if the basename of the original URI also appears somewhere else in the replacement URI, in which case it would also be replaced. The second is if the basename of the original URI partially matches the basename of the replacement URI, in which case the inital part of the basename from the replacement URI would be left behind. The second case caused test_npm_premirrors_with_specified_filename to fail. The solution is to prefix the basename with a slash when matching to avoid partial matches, and only replace the basename at the end of the URI. This also adds two test cases that test for these problems. Before this they would give the following errors: - ['file:///mirror/example/1.0.0/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] + ['file:///mirror/some-example-1.0.0.tgz/1.0.0/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] ? +++++ ++++++++++ - ['file:///mirror/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] + ['file:///mirror/some-some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] ? +++++ (Bitbake rev: 5924c6f007519cd8ea6cc8b316814d17b43048ca) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Make test_npm_premirrors work with the current fetcherPeter Kjellerstedt2022-02-051-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two totally opposite use cases for how a premirror is expected to behave in combination with specifying a downloadfilename= parameter in the SRC_URI. On the one hand there is the expectation that it works like any other mirror, which means the premirror is expected to contain a file with the original name specified in the SRC_URI. On the other hand there is the expectation that one can use the artefacts downloaded by bitbake in ${DL_DIR} as a premirror, in which case it is expected to contain a file with the name from the downloadfilename= parameter. The latter case has been how downloaded files have been handled until commit 8a3ff9f3 (fetch2: fix premirror URI when downloadfilename defined), where the fetcher was changed to store files as per the first case. This is also when the test_npm_premirrors test case was modified in commit 5ba191a0 (tests/fetch: add and fix npm tests) to expect the first case. The above change was later reverted in commit 96c30007 (fetch2: fix downloadfilename issue with premirror). However the test_npm_premirrors test case was not updated to match, and has been failing ever since. This has probably gone unnoticed because the npm related test cases require that npm is installed on the host. This commit updates test_npm_premirrors to expect that premirrors use the filenames specified by downloadfilename= as this matches the current fetcher implementation and also is the most likely use case for premirrors. It also tries to mimic how one typically might setup the premirror directory by simply copying the download directory. (Bitbake rev: 9e913ade70474aaeb928814d4763e7105569d63a) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Only set the Git user name/email if they are not ↵Peter Kjellerstedt2022-02-051-18/+13
| | | | | | | | | | | already set If they are set, assume they are correct. (Bitbake rev: a3a3a40b96c29051d97d0c96eb01784cbd1f5420) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Unify how git commands are runPeter Kjellerstedt2022-02-051-46/+27
| | | | | | | | | | | | This unifies the three separate implementations of git() from GitMakeShallowTest, GitShallowTest and GitLfsTest into one implementation in FetcherTest. It also makes use of this in FetcherLocalTest and FetcherNetworkTest. (Bitbake rev: 8c8b418c3e6f8ab2535ad405e8006ee1012f3484) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Improve the verbose messages for skipped testsPeter Kjellerstedt2022-02-051-2/+2
| | | | | | | | | | | | | | | | | | | This changes: test_foo .. skipped 'Network tests being skipped' test_foo .. skipped 'npm not installed, tests being skipped' to: test_foo .. skipped 'network test' test_foo .. skipped 'npm not installed' to avoid double "skipped" in the output. (Bitbake rev: e551328a4595c220b94ab5002d978ddb4deeebcf) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Remove unnecessary \n from mirror variablesPeter Kjellerstedt2022-02-051-0/+2
| | | | | | | | | | | Since commit 044fb04d (fetch2: Allow whitespace only mirror entries) there is no need to separate the entries in mirror variables with "\n". (Bitbake rev: ed22b078aae25e804ca5edf062e2c905d3e49426) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Skip the crate tests if network tests are disabledPeter Kjellerstedt2022-02-051-23/+23
| | | | | | | | | Both test_crate_url and test_crate_url_multi require Internet access. (Bitbake rev: 34e9daed6a7f766bb6e27c7e02c94b545f4791d8) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add crate fetcherRichard Purdie2022-01-191-0/+35
| | | | | | | | | This imports the crate fetcher from OE-Core to resolve various module issues and adds some very very basic tests of that new fetcher. (Bitbake rev: 1f06f326fa8b47e2a4dce756d57a9369a2225201) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Drop gnu urls from wget connectivity testRichard Purdie2021-12-201-3/+0
| | | | | | | | | These urls are no longer adding much to the test coverage but the intermittent network issues connecting to them are painful. Drop the urls. (Bitbake rev: bdf5739c5d831dc97a7d81568f94a0953c71017f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/runqueue: Improve lockfile handling raceRichard Purdie2021-12-141-2/+38
| | | | | | | | | | | | | | Internal bitbake shutdown timings must have changed recently as we're seeing race issues on the autobuilder around the removal of the bitbake.lock file. Improve the lockfile race code to cover bitbake's lockfile too and use it in all the tests. [YOCTO #14658] [YOCTO #14652] (Bitbake rev: bd1912bed64424f9fb28396b71bb49b6090ed087) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: add a test for version check where compression changesAlexander Kanavin2021-12-092-0/+65
| | | | | | | (Bitbake rev: b6f0c29346ad6463c0e521248633e71886bfb5dc) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: test/fetch: Add striplevel unpack parameter testStefan Herbrechtsmeier2021-11-261-0/+15
| | | | | | | (Bitbake rev: 7e1ca7ab50e3c6b642c3c11504c7c8f52cfa4528) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Fix url remap issue and add testcaseRichard Purdie2021-11-211-0/+1
| | | | | | | | | | Using "" as a target for .replace() is a really bad idea as it duplicates the replacement for every character in the string. Add a testcase which triggered this and correct the code to return the correct result. (Bitbake rev: 3af1ecf049d2eed56f6d319dc7df6eb4a3d4eebc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/runqueue: Set TOPDIR in testRichard Purdie2021-11-151-1/+2
| | | | | | | | | | It was clear with testing that we're asuming bitbake sets TOPDIR correctly when running these tests. Remove that implict assumption and make it explicit. (Bitbake rev: c8f1eb377ceb1fc78cbfaed976107720ad78c075) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Update pcre.org address after github changesRichard Purdie2021-11-071-1/+1
| | | | | | | | | | vcs.pcre.org was a redirect to github which we use for subversion testing. With the protocol changes at github and the removal of the redirect, use a direct address for github. (Bitbake rev: 6230ca71eb7eb2a6db162e28a01727d00af5299b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Add test for url parameter rewritingRichard Purdie2021-11-031-1/+2
| | | | | | | | | Add a test to ensure that a parameter like protocol=git can be rewritten to a different url and protocol. (Bitbake rev: 69b4f9a09ff74378788cc2ec1ad58cd66b27ca59) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: Handle mirror user/password replacements correctlyRichard Purdie2021-11-031-0/+4
| | | | | | | | | | | Username or password replacements in URIs were being appended rather than replaced in mirror url remapping. Fix this and add a test case. [YOCTO #13823] (Bitbake rev: 66ad58bb87e5158aced572be4f1d5726bc97fcce) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Update github urlsRichard Purdie2021-11-031-13/+13
| | | | | | (Bitbake rev: 07fca7e3ab696ba985b3ef86ab9031d688bf2df2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: Allow git fetcher to support subdir paramRichard Purdie2021-11-031-2/+2
| | | | | | | | | | | | | | | | | | The git fetcher is odd in that it supports destsuffix as a parameter but not the default documented subdir parameter. destsuffix is more limited as it can't take absolute paths. Rework the code to correctly support subdir. Also cleanup to use the None default .get() values and be a bit more pythonic and use subpath as the variable name for subpath for code clarity. We could consider dropping destsuffix as a parameter as some future point. Also fix the tests not to pass in a subdir parameter which was never used but now causes errors. (Bitbake rev: 66953f06fe822e4001efabd9fc1c985ea2b03f96) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch.py: add test case to ensure downloadfilename is used ↵Chen Qi2021-11-011-0/+8
| | | | | | | | | | | | | | | | | for premirror Add a test case test_fetch_premirror_use_downloadfilename_to_fetch to ensure that 'downloadfilename' is used when fetching from premirror. Although the other two previous test cases, test_fetch_premirror_specify_downloadfilename_regex_uri and test_fetch_premirror_specify_downloadfilename_specific_uri already implicitly contain such verification, we still need to add a very clear case to ensure no regression. (Bitbake rev: 20aabc3d53f69949810ecf02295725db947ffef8) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch.py: fix premirror test casesChen Qi2021-11-011-4/+4
| | | | | | | | | | When downloadfilename is specified, it is used to fetch from premirror. So fix the test cases accordingly. (Bitbake rev: 3b4d2e3b5024324058360a2a28f33c34114218d0) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/runqueue: Drop python version test decoratorsRichard Purdie2021-10-271-3/+0
| | | | | | | | Our minimum python version is 3.6 so these are now unneeded. (Bitbake rev: 15f16bf973666807e94f3b356095f8265af0282a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: test/fetch: Update urls to match upstream branch name changesRichard Purdie2021-10-171-3/+3
| | | | | | (Bitbake rev: 473e2a5486bd972ad0f808db089abcb8945d3a48) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/runqueue: Ensure hashserv exits before deleting filesRichard Purdie2021-10-161-1/+1
| | | | | | | | | | | We've seen races where the socket may be gone but the server is still writing out it's database. Handle that case too to avoid cleanup tracebacks. [YOCTO #14440] (Bitbake rev: b9e4fb843cb9d3a4d4404af093a781fab5520465) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-worker: Set BB_CURRENTTASK earlierRichard Purdie2021-10-141-1/+1
| | | | | | | | | | | For some debugging, BB_CURRENTTASK is set too late to be useful as it isn't present in some event handlers for example. There is no other way to know which task is actually running so set the value earlier. (Bitbake rev: 7daaaaa27f55b5a458656857c6d61a51b34a62fe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: replace http with https for URLsJon Mason2021-10-081-16/+16
| | | | | | | | | | | https has been the preferred way to access websites for many years now. Change all of the URLs with a _working_ https server/certificate to use that URL. (Bitbake rev: da543cdaf88a387675e25d3555765f1146e4105e) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: prefix the FetcherTest temporary directoryRoss Burton2021-10-081-1/+1
| | | | | | | | | Set a prefix so the temporary directories are identifable. (Bitbake rev: c3440b82cbe9c317f9961d61e12ea37fc9541ce0) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/utils: mark a regex as a raw stringRoss Burton2021-10-081-1/+1
| | | | | | | | | Avoids a warning from Python as \s isn't a valid escape. (Bitbake rev: be39c2e926beebe78030fbe26c6737f08f960fcb) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>