Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336008 - [tests] JUnit tests for launch configuration and restart
Summary: [tests] JUnit tests for launch configuration and restart
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 14:16 EST by Marc Khouzam CLA
Modified: 2011-02-10 09:12 EST (History)
3 users (show)

See Also:
marc.khouzam: review? (john.cortell)


Attachments
New tests (69.37 KB, patch)
2011-02-01 14:16 EST, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-02-01 14:16:48 EST
Created attachment 188071 [details]
New tests

I wrote some new JUnit tests that cover some of the launching and restarting of a DSF-GDB debug session.  These tests make sure that the launch respects parameter set by the user such as arguments, environment variables, gdbinit file, and more.

There are 27 new tests in total.  4 of which are currently ignored because I haven't figured out how to get them to do what I want, while another 4 actually fail.  The ones that fail seem to be because of a real bug in DSF-GDB, which I will address in a separate bugzilla.

These tests will prove useful as I will be changing the code that takes care of the launching, as part of the multi-process effort.
Comment 1 Marc Khouzam CLA 2011-02-01 14:21:08 EST
I committed the patch to HEAD.

I have added the tests to all test suites (6.6 to 7.2) but I didn't add them to the remoteSuite yet.

This is a pretty large patch, but maybe John can have a quick look at the overall approach?
Comment 2 CDT Genie CLA 2011-02-01 15:23:04 EST
*** cdt cvs genie on behalf of mkhouzam ***
Bug 336008: [tests] JUnit tests for launch configuration and restart

[*] AllSuites.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllSuites.java?root=Tools_Project&r1=1.3&r2=1.4
[+] LaunchConfigurationAndRestartTest.java  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java?root=Tools_Project&revision=1.1&view=markup
[*] AllTests.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllTests.java?root=Tools_Project&r1=1.3&r2=1.4

[*] Suite_6_8.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java?root=Tools_Project&r1=1.3&r2=1.4
[+] LaunchConfigurationAndRestartTest_6_8.java  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/LaunchConfigurationAndRestartTest_6_8.java?root=Tools_Project&revision=1.1&view=markup

[*] Suite_7_1.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_7_1.java?root=Tools_Project&r1=1.2&r2=1.3
[+] LaunchConfigurationAndRestartTest_7_1.java  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/LaunchConfigurationAndRestartTest_7_1.java?root=Tools_Project&revision=1.1&view=markup

[*] SyncUtil.java 1.14 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java?root=Tools_Project&r1=1.13&r2=1.14
[*] BaseTestCase.java 1.15 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java?root=Tools_Project&r1=1.14&r2=1.15

[+] launchConfigTestGdbinit  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/launchConfigTestGdbinit?root=Tools_Project&revision=1.1&view=markup
[+] LaunchConfigurationAndRestartTestApp.cc  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/LaunchConfigurationAndRestartTestApp.cc?root=Tools_Project&revision=1.1&view=markup

[*] Suite_6_6.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java?root=Tools_Project&r1=1.3&r2=1.4
[+] LaunchConfigurationAndRestartTest_6_6.java  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/LaunchConfigurationAndRestartTest_6_6.java?root=Tools_Project&revision=1.1&view=markup

[+] LaunchConfigurationAndRestartTest_6_7.java  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/LaunchConfigurationAndRestartTest_6_7.java?root=Tools_Project&revision=1.1&view=markup
[*] Suite_6_7.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java?root=Tools_Project&r1=1.3&r2=1.4

[+] LaunchConfigurationAndRestartTest_7_0.java  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/LaunchConfigurationAndRestartTest_7_0.java?root=Tools_Project&revision=1.1&view=markup
[*] Suite_7_0.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java?root=Tools_Project&r1=1.3&r2=1.4

[+] LaunchConfigurationAndRestartTest_7_2.java  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/LaunchConfigurationAndRestartTest_7_2.java?root=Tools_Project&revision=1.1&view=markup
[*] Suite_7_2.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_7_2.java?root=Tools_Project&r1=1.2&r2=1.3
Comment 3 Marc Khouzam CLA 2011-02-01 16:25:25 EST
(In reply to comment #0)
> ... another 4 actually fail.  The ones that fail seem to be because of a real bug in DSF-GDB, which I will address in a separate bugzilla.

I have fixed this issue with Bug 336013.

So, all new tests should now pass (with 4 ignored ones).