Skip to content

Commit

Permalink
Move scripts with tests
Browse files Browse the repository at this point in the history
Change default debugger in run configuration to /usr/local/bin/lldbmi2
Add a makefile tag to install
  • Loading branch information
freedib committed Apr 9, 2016
1 parent 4631ccc commit 326a4dd
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 24 deletions.
12 changes: 12 additions & 0 deletions .cproject
Expand Up @@ -162,4 +162,16 @@
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
<buildTargets>
<target name="install" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>sh</buildCommand>
<buildArguments>/Users/didier/Projets/git-lldbmi2/lldbmi2/build.sh -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=1</buildArguments>
<buildTarget>install</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
</buildTargets>
</storageModule>
</cproject>
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,4 +1,5 @@
/.metadata
/.settings
/build
/logs/*.log
/logs/*.log
/Notes.txt
4 changes: 2 additions & 2 deletions .launchers/lldbmi2 script lldbmi2.launch
Expand Up @@ -6,7 +6,7 @@
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${workspace_loc:lldbmi2}/build/lldbmi2 --log"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="/usr/local/bin/lldbmi2 --log"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
Expand All @@ -21,7 +21,7 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="--interpreter mi2 --nx --script scripts/inheritance.txt --log --logmask 3FFF"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="--interpreter mi2 --nx --script tests/scripts/inheritance.txt --log --logmask 3FFF"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/lldbmi2"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="lldbmi2"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
Expand Down
2 changes: 1 addition & 1 deletion .launchers/lldbmi2 test lldbmi2.launch
Expand Up @@ -6,7 +6,7 @@
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${workspace_loc:lldbmi2}/build/lldbmi2 --log"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="/usr/local/bin/lldbmi2 --log"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
Expand Down
2 changes: 1 addition & 1 deletion .launchers/tests lldbmi2.launch
Expand Up @@ -6,7 +6,7 @@
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${workspace_loc:lldbmi2}/build/lldbmi2 --log --logmask 3FFF"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="/usr/local/bin/lldbmi2 --log --logmask 3FFF"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(BUILD_TESTS)
file(GLOB_RECURSE tests_paths ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.cpp)
file(GLOB_RECURSE tests_paths ${CMAKE_CURRENT_SOURCE_DIR}/tests/src/*.cpp)
foreach( test_path ${tests_paths} )
get_filename_component(test_source ${test_path} NAME )
string( REPLACE ".cpp" "" project_name ${test_source} ) # cut off .cpp
Expand Down
34 changes: 17 additions & 17 deletions src/test.cpp
Expand Up @@ -32,8 +32,8 @@ const char *testcommands_THREAD[] = {
"51-environment-cd %s/tests",
"52-file-exec-and-symbols --thread-group i1 %s/build/tests",
"53-gdb-set --thread-group i1 args %s",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:34",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:77",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:34",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:77",
"61-inferior-tty-set --thread-group i1 %s", // stdout instead of /dev/ptyxx
"62-exec-run --thread-group i1",
"64-list-thread-groups",
Expand All @@ -58,7 +58,7 @@ const char *testcommands_VARS[] = {
"51-environment-cd %s/tests",
"52-file-exec-and-symbols --thread-group i1 %s/build/tests",
"53-gdb-set --thread-group i1 args %s",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:74",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:74",
"61-inferior-tty-set --thread-group i1 %s", // stdout instead of /dev/ptyxx
"62-exec-run --thread-group i1",
"76-var-evaluate-expression c",
Expand All @@ -74,7 +74,7 @@ const char *testcommands_UPDATE[] = {
"51-environment-cd %s/tests",
"52-file-exec-and-symbols --thread-group i1 %s/build/tests",
"53-gdb-set --thread-group i1 args %s",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:76",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:76",
"61-inferior-tty-set --thread-group i1 %s", // stdout instead of /dev/ptyxx
"62-exec-run --thread-group i1",
"41-stack-list-locals --thread 1 --frame 0 1",
Expand All @@ -98,7 +98,7 @@ const char *testcommands_LARGE_CHAR_ARRAY[] = {
"17-file-exec-and-symbols --thread-group i1 %s/build/tests",
// "19-gdb-show --thread-group i1 language",
"53-gdb-set --thread-group i1 args %s",
"26-break-insert -f %s/tests/tests.cpp:92",
"26-break-insert -f %s/tests/src/tests.cpp:92",
"28-exec-run --thread-group i1",
"35-stack-list-locals --thread 1 --frame 0 1",
"36-var-create --thread 1 --frame 0 - * ccc",
Expand All @@ -121,7 +121,7 @@ const char *testcommands_LARGE_ARRAY[] = {
"17-file-exec-and-symbols --thread-group i1 %s/build/tests",
// "19-gdb-show --thread-group i1 language",
"53-gdb-set --thread-group i1 args %s",
"26-break-insert -f %s/tests/tests.cpp:112",
"26-break-insert -f %s/tests/src/tests.cpp:112",
"28-exec-run --thread-group i1",
"39-var-create --thread 1 --frame 0 - * *((i)+0)@100",
"39-var-create --thread 1 --frame 0 - * *((s)+0)@100",
Expand All @@ -133,7 +133,7 @@ const char *testcommands_POINTERS[] = {
"51-environment-cd %s/tests",
"52-file-exec-and-symbols --thread-group i1 %s/build/tests",
"53-gdb-set --thread-group i1 args %s",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:125",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:125",
"62-exec-run --thread-group i1",
"64-list-thread-groups",
"65-list-thread-groups i1",
Expand Down Expand Up @@ -173,7 +173,7 @@ const char *testcommands_POINTERS[] = {
const char *testcommands_ATTACH[] = {
"51-environment-cd %s/tests",
"62-target-attach --thread-group i1 tests",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:34",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:34",
"61-inferior-tty-set --thread-group i1 %s", // stdout instead of /dev/ptyxx
"65-list-thread-groups i1",
"69-thread-info 1",
Expand All @@ -190,7 +190,7 @@ const char *testcommands_MEMBERS[] = {
"52-file-exec-and-symbols --thread-group i1 %s/build/tests",
"53-gdb-set --thread-group i1 args %s",
"64-list-thread-groups",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:175",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:175",
"62-exec-run --thread-group i1",
"64-list-thread-groups",
"65-list-thread-groups i1",
Expand All @@ -213,7 +213,7 @@ const char *testcommands_STRING[] = {
"52-file-exec-and-symbols --thread-group i1 %s/build/tests",
"53-gdb-set --thread-group i1 args %s",
"64-list-thread-groups",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:263",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:263",
"62-exec-run --thread-group i1",
"64-list-thread-groups",
"65-list-thread-groups i1",
Expand Down Expand Up @@ -244,9 +244,9 @@ const char *testcommands_ARGS[] = {
"53-gdb-set --thread-group i1 args %s",
"64-list-thread-groups",
"19-gdb-show --thread-group i1 language",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:210",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:224",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:226",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:210",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:224",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:226",
"62-exec-run --thread-group i1",
"64-list-thread-groups",
"65-list-thread-groups i1",
Expand Down Expand Up @@ -333,7 +333,7 @@ const char *testcommands_CRASH[] = {
"51-environment-cd %s/tests",
"52-file-exec-and-symbols --thread-group i1 %s/build/tests",
"53-gdb-set --thread-group i1 args %s",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:202",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:202",
"61-inferior-tty-set --thread-group i1 %s", // stdout instead of /dev/ptyxx
"62-exec-run --thread-group i1",
"76-var-evaluate-expression err",
Expand All @@ -345,7 +345,7 @@ const char *testcommands_INPUT[] = {
"51-environment-cd %s/tests",
"52-file-exec-and-symbols --thread-group i1 %s/build/tests",
"53-gdb-set --thread-group i1 args %s",
"58-break-insert --thread-group i1 %s/tests/tests.cpp:274",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:274",
"61-inferior-tty-set --thread-group i1 %s", // stdout instead of /dev/ptyxx
"62-exec-run --thread-group i1",
"80-gdb-exit",
Expand All @@ -369,7 +369,7 @@ const char *testcommands_BIG_CLASS[] = {
"52-file-exec-and-symbols --thread-group i1 %s/build/tests",
"53-gdb-set --thread-group i1 args %s",
"61-inferior-tty-set --thread-group i1 %s", // stdout instead of /dev/ptyxx
"58-break-insert --thread-group i1 %s/tests/tests.cpp:338",
"58-break-insert --thread-group i1 %s/tests/src/tests.cpp:338",
"62-exec-run --thread-group i1",
"53-stack-list-frames --thread 1",
"80-gdb-exit",
Expand All @@ -381,7 +381,7 @@ const char *testcommands_LONG_INHERITANCE[] = {
"32-file-exec-and-symbols --thread-group i1 %s/build/tests",
"33-gdb-set --thread-group i1 args %s",
"34-inferior-tty-set --thread-group i1 %s",
"35-break-insert --thread-group i1 %s/tests/tests.cpp:366",
"35-break-insert --thread-group i1 %s/tests/src/tests.cpp:366",
"36-exec-run --thread-group i1",
"40-stack-list-frames --thread 1",
"41-stack-list-arguments --thread 1 1",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/inheritance.txt → tests/scripts/inheritance.txt
Expand Up @@ -2,7 +2,7 @@
-file-exec-and-symbols --thread-group i1 %s/build/inheritance
-gdb-set --thread-group i1 args %s
-inferior-tty-set --thread-group i1 %s
-break-insert --thread-group i1 %s/tests/inheritance.cpp:25
-break-insert --thread-group i1 %s/tests/src/inheritance.cpp:25
-exec-run --thread-group i1
-stack-list-frames --thread 1
-stack-list-arguments --thread 1 1
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 326a4dd

Please sign in to comment.