diff options
author | Mikko Rapeli <mikko.rapeli@linaro.org> | 2023-08-23 09:10:23 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-07 14:36:30 +0100 |
commit | d95c3d3b18c902d771803d6f624e6fac058b1641 (patch) | |
tree | 8effe523300b7599695f9e4a292f9fed01127fe7 /meta/lib/oeqa | |
parent | 4bbcafa914ada94c08b6344b100e4af5ad6b2f38 (diff) | |
download | poky-d95c3d3b18c902d771803d6f624e6fac058b1641.tar.gz |
oeqa selftest context.py: fix git commands and set branch name
Check return values of each git command and set initial branch name
to avoid this warning on every test run:
NOTE: Starting bitbake server...
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
(From OE-Core rev: 5ec557467dda29309e25102b507bb919275bedbb)
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/selftest/context.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index bd03e765b0..bc3915a3aa 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py | |||
@@ -104,7 +104,7 @@ class OESelftestTestContext(OETestContext): | |||
104 | oe.path.copytree(builddir + "/cache", newbuilddir + "/cache") | 104 | oe.path.copytree(builddir + "/cache", newbuilddir + "/cache") |
105 | oe.path.copytree(selftestdir, newselftestdir) | 105 | oe.path.copytree(selftestdir, newselftestdir) |
106 | 106 | ||
107 | subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True) | 107 | subprocess.check_output("git init -b main && git add * && git commit -a -m 'initial'", cwd=newselftestdir, shell=True) |
108 | 108 | ||
109 | # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow | 109 | # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow |
110 | subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True) | 110 | subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True) |