Commit Graph

13 Commits

Author SHA1 Message Date
Alistair Francis
ebedc1511d gdb: Upgrade from 8.2.1 to 8.3
Bump GDB and change the oeqa selftest expression to allow ptests to
pass.

(From OE-Core rev: f31986ed9f82c48834b2f25979c93697228acbf7)

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-21 12:56:33 +01:00
Richard Purdie
ffae400179 meta/lib+scripts: Convert to SPDX license headers
This adds SPDX license headers in place of the wide assortment of things
currently in our script headers. We default to GPL-2.0-only except for the
oeqa code where it was clearly submitted and marked as MIT on the most part
or some scripts which had the "or later" GPL versioning.

The patch also drops other obsolete bits of file headers where they were
encoountered such as editor modelines, obsolete maintainer information or
the phrase "All rights reserved" which is now obsolete and not required in
copyright headers (in this case its actually confusing for licensing as all
rights were not reserved).

More work is needed for OE-Core but this takes care of the bulk of the scripts
and meta/lib directories.

The top level LICENSE files are tweaked to match the new structure and the
SPDX naming.

(From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Richard Purdie
c7592b0147 oeqa: Drop OETestID
These IDs refer to testopia which we're no longer using. We would now use the test
names to definitively reference tests and the IDs can be dropped, along with their
supporting code.

(From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Ola x Nilsson
e798efcc5b selftest/package: Correct format arguments in test_gdb_hardlink_debug
(From OE-Core rev: 7c2c9b876334cc7357f818c3b3744fc97987e38f)

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Hongxu Jia
1c048479af selftest/package: Add package separated debug symbols hardlink test
Tweak recipe selftest-hardlink
- addition of libexecdir to simulate multiple directories
- add gdb.sh to run gdb from script which is invoked at test time.
- rename `hello' -> `hello1' to workaround name confliction with the one in lmbench

Add test_gdb_hardlink_debug to selftest/package
- run a qemu and invoke gdb.sh to gdb binaries of selftest-hardlink
- check gdb to read symbols from separated debug hardlink file
- check debug symbols works correctly

[Test without commit `package.bbclass: only one hardlink of separated debug info file in each directory']
2018-08-26 01:27:30,195 - oe-selftest - INFO - test_gdb_hardlink_debug (package.PackageTests)
2018-08-26 01:30:29,005 - oe-selftest - INFO - gdbtest /usr/bin/hello1
2018-08-26 01:30:36,539 - oe-selftest - INFO - gdbtest /usr/bin/hello2
2018-08-26 01:30:43,568 - oe-selftest - INFO - gdbtest /usr/libexec/hello3
2018-08-26 01:30:50,157 - oe-selftest - ERROR - No debugging symbols found. GDB result:
Reading symbols from /usr/libexec/hello3...(no debugging symbols found)...done.^M
(gdb) Function "main" not defined.^M
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]^M
(gdb) Starting program: /usr/libexec/hello3 ^M
Hello World!^M
[Inferior 1 (process 320) exited normally]^M
(gdb) The program is not being run.^M
(gdb)
2018-08-26 01:30:51,180 - oe-selftest - INFO -  ... FAIL
2018-08-26 01:30:51,181 - oe-selftest - INFO - Traceback (most recent call last):
  File "oe-core/meta/lib/oeqa/selftest/cases/package.py", line 148, in test_gdb_hardlink_debug
    self.fail('GDB %s failed' % binary)
AssertionError: GDB /usr/libexec/hello3 failed
[Test without commit `package.bbclass: only one hardlink of separated debug info file in each directory']

[Test with commit `package.bbclass: only one hardlink of separated debug info file in each directory']
2018-08-26 12:40:30,976 - oe-selftest - INFO - test_gdb_hardlink_debug (package.PackageTests)
2018-08-26 12:42:15,149 - oe-selftest - INFO - gdbtest /usr/bin/hello1
2018-08-26 12:42:24,064 - oe-selftest - INFO - gdbtest /usr/bin/hello2
2018-08-26 12:42:31,078 - oe-selftest - INFO - gdbtest /usr/libexec/hello3
2018-08-26 12:42:38,646 - oe-selftest - INFO - gdbtest /usr/libexec/hello4
2018-08-26 12:42:46,824 - oe-selftest - INFO -  ... ok
[Test with commit `package.bbclass: only one hardlink of separated debug info file in each directory']

(From OE-Core rev: 104d07e57488f4a414fb5e1f60d0c8b0c02d6b4d)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28 10:30:28 +01:00
Richard Purdie
79d72d9045 selftest/package: Improve test to cover sparseness and hardlinking from sstate
The sparseness test was sometimes working and sometimes failing depending
on whether sstate was valid. This adds an explict test of sstate
to the test for both hardlinking and sparseness. Tweak the test name to
cover the fact its tests sparseness too.

(From OE-Core rev: fe5b37c07b6d07c350516ab6bf849d6d86a84004)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15 09:44:33 +01:00
Richard Purdie
20c8be711f selftest/package: Add test to ensure sparse files are preserved
Add a new element to the hardlink test to check we also preseve file
sparseness during the packing process. This should ensure we don't regress this
issue again.

(From OE-Core rev: 0a4e6974b49bf68c4a4098d339b5d655e202a3fd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15 09:44:33 +01:00
Richard Purdie
fc77dc63fe selftest/package: Fix hardlink test when using sstate
The build target won't cause the package task to run if things were already
built and in sstate. Ensure we run the package task explicitly to ensure
the test works as intended.

(From OE-Core rev: be20eb4f4ad77d9444028ca9632b74d5866d96b8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-07 12:13:03 +01:00
Richard Purdie
318595754b oeqa/selftest: Add package hardlink test
We keep breaking the preservation of hardlinks during the packaging process.
Add a selftest which tests this to try and prevent this breaking again.

(From OE-Core rev: 751fc7802f57a836a0be5fc6a8d5fdf8b1769c39)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-31 22:47:35 +01:00
Richard Purdie
9a53d315ef oeqa/selftest/package: Use setUpLocal, not setUp
The main setUp function needs to be called and tests are meant to
define setUpLocal. For some reason this one didn't leading to errors
with recent code changes. Fix it.

(From OE-Core rev: aef07f09e224485539d8bc66ddac8bf394e4092a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-16 13:21:34 +01:00
Aníbal Limón
f4a978485f selftest/cases/package: Call parent setUpClass method
Since config paths are now passed in Test context the setUpClass
method is expected to be call.

(From OE-Core rev: 7281c995ff2b009c3fb23c7af1d91fe106ca8f87)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Jose Perez Carranza
ab0780dfea selftest: Add Testopia ID to test cases
Add decorator @OETestID() with proper Tesopia TC ID to the test cases
that did not have it set.

(From OE-Core rev: d7bc697534db911a3ce98537d772d87482a0f702)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Leonardo Sandoval
157c3be2ca oeqa/selftest/cases: Migrate test cases into the new oe-qa framework
New framework has different classes/decorators so adapt current test cases to
support these. Changes include changes on base classes and decorators.

Also include paths in selftest/__init__.py isn't needed because the
loader is the standard unittest one.

(From OE-Core rev: ddbbefdd124604d10bd47dd0266b55a764fcc0ab)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-06 19:02:43 +01:00