1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00
Commit graph

336 commits

Author SHA1 Message Date
Jonah Graham
cedcf7655b Bug 472765: more complete tests for source path mapping
Add some more tests for source path mappings to ensure that the upcoming
change of using gdb's set substitute-path does not regress any issues.

Change-Id: I9067c8859293c3332439679cb1f663e36a4cc34e
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2016-01-06 12:46:20 -05:00
Marc Khouzam
f3ff649041 Fix copyright of all CDT plugins using the copyright tool from platform.
This commit does not add missing copyrights, just updates the date on
the existing ones.

Change-Id: I646f5afd533a1fcc539bdf2e0686b22f406ecf65
2016-01-03 20:38:31 -05:00
Marc Khouzam
5892f19747 Update GDB download script for 7.10.1
Also fix a bug where the script was
not ready for a two digit version.

Change-Id: Idd3322c46806705e33898a47c79d3ec3c9fc1685
2015-12-14 07:13:30 -05:00
Sergey Grant
8360f715eb Bug 474648 - Wrong arguments are passed to a program in debug mode
Change-Id: Ie9ab74e0142c10ad43891febf910e2fb49b2ec61
Signed-off-by: Sergey Grant <sergey.grant@me.com>
2015-12-03 14:43:31 -08:00
Marc Khouzam
ca2070f258 Modify properties to make them easier to use.
Also standardize properties names

Change-Id: I4b25f879d8c0b3b1e74b9590905b1a4b0cfe02ca
2015-10-30 13:45:23 -04:00
Marc-Andre Laperle
8b01ed9b2c Add dsf.gdb.tests.timeout.multiplier property to pom.xml
This allows specifying the multiplier on the command line and pass
it along to the tests.

Change-Id: I35cb764a6494a0eb98e5e2205a47522935c2b206
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2015-10-26 15:43:10 -04:00
Jonah Graham
cc2099c4a0 Bug 478803 and Bug 478805: add tests for source lookup
Change-Id: If47f62a46164e4098e663f1eef1a0a8640a84009
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2015-10-01 22:31:39 +01:00
Marc Khouzam
15935286c0 Replace hack to obtain full path
We can obtain the full path of the executable using
File#getAbsolutePath().  This is much better than the hack that was
actually doing a launch to ask GDB where the binary was.

I cannot explain why I didn't use this in the original implementation.

Change-Id: Ifa0d538919cd0c231547f1f3e9c4b72837df4257
2015-09-25 12:59:20 -04:00
Simon Marchi
74e4b6d504 Fix MIMemoryTest.java:asynchronousReadWrite for architectures with fWordSize > 1
Commit 84a53f8d80 broke this test for an
architecture with fWordSize == 2.  The buffer for writing a word went from
length fWordSize to 1, and the expected buffer size of a read as well.
This commit fixes it.

Change-Id: Ie50766031fc7dd8d480f126abc48a6dfd487b9e5
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-09-16 09:44:01 -04:00
Marc Khouzam
be95954cdd Have Debug's automated tests use the new GDB 7.10
Change-Id: I6c2d2aa925b0d54add32ec8d8e8f167d4bdd9b6f
2015-09-03 21:01:12 -04:00
Simon Marchi
f505c21a48 Add version 7.10 to GDB download and build script
Change-Id: I5b58beb4fd628392461ebca55caa0724a154e147
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-08-31 10:49:13 -04:00
Simon Marchi
6ed3ce5fce MIRegistersTest fixes
- Fix getModelDataForRegisterDataValueInDifferentNumberFormats failure

Nothing seems to set the register we use to do the test to a particular
value.  The value happened to be 0.  This broke the octal test, because
it assumes that the result starts with a 0, but has characters after
that 0.  This is not true when the result is 0.  The fix is to set the
register to a know value beforehand (0x1234).

- Fix compareRegisterForMultipleExecutionContexts for slow targets by
adding missing massageTimeout.

Change-Id: I681acdeb08f8e3c2fdaf8dc9cf60801584da4423
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-08-06 14:47:38 -04:00
Marc Khouzam
93df44a4ca Disable remote detach test case for 7.5
With gdbserver 7.5, detaching from a process leaves gdbserver hanging
which prevents the next testcase from running.

We therefore disable the two detach testcases for version 7.5 only.
Note that we cannot simply @ignore the testcases since we want to run
them for the local case, even for version 7.5.

Change-Id: Id4b69420abd1218be5eaf2c54a9f44349283edc2
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-07-17 15:53:44 -04:00
Marc Khouzam
5028a94396 Disable restart test in case of remote debugging
Change-Id: I08310791fe23c31219ea0e6ae26ea7f0a14eeff7
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-07-17 08:16:17 -04:00
Marc Khouzam
75a3d71546 Create tests for GDB 7.10
Change-Id: I940f95a73278483d1b21dc8df9cdd41520522959
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-06-23 16:11:30 -04:00
Simon Marchi
e634076cdf Change way to skip building of gdb doc
Instead of modifying the source files of the documentation, it's cleaner
to replace the invocation to makeinfo to invoke "true". This will skip
building of all the docs.

Change-Id: I33a8ba7e1932433de48ab98d6cda3fda0bb09143
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-06-22 15:34:19 -04:00
Simon Marchi
13978c1567 [dsf-gdb] tests: Check if a line tag is defined more than once
As a safety net, fail if a line tag is defined more than once.

Also, allow calling resolveLineTagLocations more than once for a single
test.

Change-Id: I0832d3d28c4d688c38fd33dfc668b0ec6b8c4ffa
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-06-22 10:00:17 -04:00
Marc Khouzam
bb61124897 Incremented CDT feature version to 8.8.0
Change-Id: Ib1189a08a5f0225fd676b682dc8a10477ad3acc5
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-06-10 09:33:49 -04:00
Jonah Graham
8282a1767e Bug 469007: Reference MIExpressionsNonStopTest in test suites
Change-Id: If29de1ee2941a2bb3cb5c27dd9a61741b76165e6
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2015-06-01 15:08:22 -04:00
Marc Khouzam
fe51f92804 Update GDB download script for version 7.9.1
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-05-13 15:36:23 -04:00
Marc Khouzam
e820f872ad Incremented CDT feature version to 8.7.0
Change-Id: Ife0feaaa9263d2b7797e31d628250bd26caff1b5
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-05-04 21:07:13 -04:00
Simon Marchi
c4f5c35620 [dsf-gdb] debug tests: Remove useless try/catch
The try/catch doesn't add anything. If getStackTrace throws, the test
will fail and will show the useful stack trace.

Change-Id: Icf453ff2ca6c10a32f264fece0f0db9af8049612
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-05-01 10:10:58 -04:00
Marc Khouzam
3f8305fc0f Move to new getAdapter() signature using generics
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-04-15 15:39:36 -04:00
Simon Marchi
84a53f8d80 [dsf-gdb] Remove usage of AsyncCompletionWaitor in MIMemoryTest.asynchronousReadWrite
Change-Id: I700736eea51f5aa5292143e11a259c958af2a68e
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-04-13 11:05:42 -04:00
Marc-Andre Laperle
8f2d399431 Upgrade maven plugin versions
I used this command to print a summary of the updates:
mvn versions:display-plugin-updates -Djava.net.useSystemProxies | grep "\\->" | sort | uniq

The command reports which maven plugin versions are outdated per cdt project (pom.xml). The extra grep and sort are just to make it display as a short summary.

Change-Id: I6abec0c1d510aac4599fb0d573d443807ee84a7b
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2015-03-16 16:56:27 -04:00
Simon Marchi
539660d4f7 [dsf-gdb] gdb download script: add examples and print help if unsupported version is given
I got a feedback that the error message when passing an unsupported
version should be more helpful.

Change-Id: I3c925c500d6de787ca9bfce421eda6109e9f6415
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-26 18:26:42 -05:00
Simon Marchi
0ba2118dc9 [dsf-gdb] debug tests: Adjust buffer sizes in MIMemoryTest to take word size into account
Change-Id: I1ffa59165c713609b25b9331c3d245094df4544e
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-24 22:26:43 -05:00
Marc Khouzam
9c05b3506a Add test suite for GDB 7.9 and move Automated Suite to use GDB 7.9
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-02-20 16:01:33 -05:00
Marc Khouzam
74bd3e0c66 Update script to support GDB 7.9
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-02-20 15:58:34 -05:00
Simon Marchi
7402cd3123 [dsf-gdb] Put back event assert in
MIMemoryTest.writeCharVarying{Address,Offset}

When we switched SyncUtil.readMemory to use queries, it exposed a race
condition with the asserts that check for the number of event received.
Basically, nothing guarantees that when the assert is evaluated the
event had the time to arrive.

We now use a ServiceEventWaitor to wait until the event arrives (with a
timeout, of course).

At the same time, rename word_size to wordSize.

Change-Id: I6f4b51e22f46625e20bbbdbac91cf70cfd864e5e
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 14:27:39 -05:00
Simon Marchi
7328220fe6 [dsf-gdb] Add expected message in MIMemoryTest.writeWithInvalidAddress
Change-Id: Id1f46c879669e3a428bbc8039ff6363be35a9cb6
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 14:14:00 -05:00
Simon Marchi
18a8a45323 debug tests: add missing massageTimeout
Change-Id: I6be611a345de90f36996151fb910449292938f15
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 14:09:12 -05:00
Marc Khouzam
61ee8133f2 Small cleanup in the tests.
Change-Id: I3236c0efc3de5dbc9b21ed33afbbaeb1439f4864
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-02-20 14:07:17 -05:00
Simon Marchi
6f0f5d1cc4 debug tests: Move some tests from AsyncCompletionWaitor to Query
Change-Id: Ic9860c369c8cc0cf4bf9d72d83c09e60a119e9b6
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 14:05:51 -05:00
Simon Marchi
315a204251 debug tests: Convert MIDisassemblyTest to queries
Change-Id: I15a3f49e50c55d42c66b901bf302ed01f974ae98
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 14:04:10 -05:00
Alvaro Sanchez-Leon
33f85536b5 Bug 460241 - [Memory] Make tests run with different values of addressable size
Change-Id: I594071e3cee9a99d24dfcae3c080995610ffb533
2015-02-19 12:44:07 -05:00
Simon Marchi
059db21d52 debug tests: Fix error in SyncUtil.fillMemory doc
Change-Id: I7b1ab19b52a9c080c569a95e9ea11cbd45d987cb
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-18 11:35:37 -05:00
Simon Marchi
5ad1f5c4c3 debug tests: MIMemoryTest: Use runToLocation when possible
Change-Id: I66f76039cecf5333826be1b75556437a059c71b9
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-18 11:35:36 -05:00
Simon Marchi
544dbb5af8 [debug tests] Remove superfluous breakpoint tag
There is a superfluous LINE_MAIN_BEFORE_THREAD_START that is causing
problems, remove it.

Change-Id: I57c4637ada0b5efda2848029e5216a13cf638067
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-18 11:34:54 -05:00
Simon Marchi
9ed8f75f74 Change word_size to wordSize
... to respect the coding style.

Change-Id: Ie68422182afad2532ce9238665bb06576fc3cc18
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-17 20:37:37 -05:00
Marc Khouzam
2c1113c590 Bug 456959 - Disable test for versions of GDB that don't support it
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-02-07 19:33:34 -05:00
Simon Marchi
3cf7241ccb debug tests: Remove fWait field from GDBProcessesTest
Re-using the waitor between tests possibly a dependency between tests
(e.g. on the order they are ran). It would be easy to forget to add an
fWait.waitReset() to a test and break another test.

It is safer to create a new one every time, while the performance hit is
negligible.

Change-Id: I404d240b29dddffb07899e7e529e7205282bd1d2
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-04 11:26:29 -05:00
Simon Marchi
a96fcd5a37 debug tests: MIMemoryTest: Use assertEquals instead of assertTrue when
possible

Change-Id: If9fc8f3f0f1f2070b7bc4ea6dc23778001dc0092
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-04 11:22:18 -05:00
Simon Marchi
59854a48cd debug tests: Factor out duplicated code in MIMemoryTest.memoryCachedRead
Change-Id: I8ee7883e96e99d2daebe7a3748d4e5e6b3a165fe
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-01 20:47:19 -05:00
Simon Marchi
9ae9ed49f6 debug tests: Use SyncUtil's memory functions in MIMemoryTest
Change-Id: I47b9e4e65d418743da97bfddb78bfdce29f3c688
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-01 20:46:06 -05:00
Simon Marchi
e11bdc4502 debug tests: Use SyncUtil.readMemory in PostMortemCoreTest
Change-Id: I2572e7f9bef8512bd32df7c040f3f12506dc5453
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-01 20:44:45 -05:00
Simon Marchi
5500e418c9 debug tests: Use SyncUtil.readMemory in GDBConsoleSynchronizingTest
Change-Id: Ied75ccb790842a746f09e3d7b51bb9225891af96
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-01 20:41:45 -05:00
Simon Marchi
b662f3b063 debug tests: Add memory access functions to SyncUtil
Unlike those in AsyncCompletionWaitor, these functions are based on
queries. The patch also changes occurences in MIMemoryTest where it
makes sense to use synchronous functions.

Change-Id: Id5e47b7634153d916bf896e47f6cc48f1a4727bd
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-01-30 15:17:55 -05:00
Simon Marchi
80ff1f872f debug tests: Factor out test in GDBConsoleSynchronizingTest
Factor out the code for testSettingVariableWithSet and
testSettingVariableWithPrint.

testSettingVariableWithSetWithMemory is not exactly the same, so I
didn't factor it out.

Change-Id: Ib4e79eda4851ec2291fcf32054694b76e40c65ca
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-01-25 10:18:36 -05:00
Marc Khouzam
8855a845a3 Bug 456959 - Unit tests for bp after restart bug
Change-Id: Id25d6a6c7c2e094b5308ca42e2f1fa24c260f6af
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-01-21 08:13:07 -05:00