test: added test descriptions and resources for manually testing different project setup methods
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
|
||||
MY_PATH=`dirname "$0"`
|
||||
|
||||
MY_PATH="${MY_PATH//\\//}"
|
||||
|
||||
SRC_PATH=$MY_PATH/data
|
||||
WORKING_COPY_PATH=$MY_PATH/working_copy
|
||||
WORKING_COPY_SRC_PATH=$WORKING_COPY_PATH/src
|
||||
CBD_PATH=$WORKING_COPY_PATH/Test.cbp
|
||||
|
||||
mkdir -p $WORKING_COPY_PATH
|
||||
|
||||
cp -ar $SRC_PATH/. $WORKING_COPY_PATH
|
||||
|
||||
sed -i "s|<source_path>|${WORKING_COPY_SRC_PATH}|g" ${CBD_PATH}
|
||||
|
||||
echo "Setup Complete"
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
MY_PATH=`dirname "$0"`
|
||||
|
||||
WORKING_COPY_PATH=$MY_PATH/working_copy
|
||||
|
||||
echo "" >> $WORKING_COPY_PATH/src/include/Bar.h
|
||||
|
||||
echo "Update Complete"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
MY_PATH=`dirname "$0"`
|
||||
|
||||
WORKING_COPY_PATH=$MY_PATH/working_copy
|
||||
|
||||
rm -rf $WORKING_COPY_PATH
|
||||
|
||||
echo "Teardown Complete"
|
||||
@@ -0,0 +1,34 @@
|
||||
* Run "1_setup.sh"
|
||||
* Start up Sourcetrail
|
||||
* Click "New Project"
|
||||
* Enter a project name
|
||||
* Set "./working_copy" as project location
|
||||
* Click "Add Source Group"
|
||||
* Select "C++" -> C/C++ from Compilation Database"
|
||||
* Click "Next"
|
||||
* Pick "./working_copy/Test.cbp" at "Compilation Database"
|
||||
* Click "show source files" button
|
||||
* Validate "Source Files" list contains "src/main.cpp"
|
||||
* Click "OK"
|
||||
* Validate "Header Files & Directories to Index" contains "src" entry
|
||||
* Add "**/Foo.h" to "Excluded Files & Directories"
|
||||
* Click "Next"
|
||||
* Click "Create"
|
||||
* Validate "All files" is the only option selectable
|
||||
* Click "Start"
|
||||
* Validate Project indexed without error
|
||||
* Click "OK"
|
||||
* Press "Refresh" button
|
||||
* Validate "Updated files" is selected
|
||||
* Validate "source files to index" shows "0"
|
||||
* Click "Cancel"
|
||||
* Run "2_update.sh"
|
||||
* Press "Refresh" button
|
||||
* Validate "Files to clear" shows "2"
|
||||
* Validate "source files to index" shows "1"
|
||||
* Click "Start"
|
||||
* Validate Project indexed without error
|
||||
* Click "OK"
|
||||
* Close Sourcetrail
|
||||
* Run "3_teardown.sh"
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6"/>
|
||||
<Project>
|
||||
<Option title="Test"/>
|
||||
<Option makefile_is_custom="1"/>
|
||||
<Option compiler="msvc8"/>
|
||||
<Option virtualFolders="CMake Files\;"/>
|
||||
<Build>
|
||||
<Target title="all">
|
||||
<Option working_dir="<source_path>"/>
|
||||
<Option type="4"/>
|
||||
<MakeCommands>
|
||||
<Build command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 all"/>
|
||||
<CompileFile command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 "$file""/>
|
||||
<Clean command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 clean"/>
|
||||
<DistClean command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 clean"/>
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
<Target title="Test">
|
||||
<Option output="<source_path>/Test.exe" prefix_auto="0" extension_auto="0"/>
|
||||
<Option working_dir="<source_path>"/>
|
||||
<Option object_output="./"/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="msvc8"/>
|
||||
<Compiler>
|
||||
<Add directory="<source_path>/include"/>
|
||||
</Compiler>
|
||||
<MakeCommands>
|
||||
<Build command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 Test"/>
|
||||
<CompileFile command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 "$file""/>
|
||||
<Clean command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 clean"/>
|
||||
<DistClean command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 clean"/>
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
<Target title="Test/fast">
|
||||
<Option output="<source_path>/Test.exe" prefix_auto="0" extension_auto="0"/>
|
||||
<Option working_dir="<source_path>"/>
|
||||
<Option object_output="./"/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="msvc8"/>
|
||||
<Compiler>
|
||||
<Add directory="<source_path>/include"/>
|
||||
</Compiler>
|
||||
<MakeCommands>
|
||||
<Build command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 Test/fast"/>
|
||||
<CompileFile command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 "$file""/>
|
||||
<Clean command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 clean"/>
|
||||
<DistClean command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 clean"/>
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
<Target title="edit_cache">
|
||||
<Option working_dir="<source_path>"/>
|
||||
<Option type="4"/>
|
||||
<MakeCommands>
|
||||
<Build command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 edit_cache"/>
|
||||
<CompileFile command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 "$file""/>
|
||||
<Clean command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 clean"/>
|
||||
<DistClean command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 clean"/>
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
<Target title="rebuild_cache">
|
||||
<Option working_dir="<source_path>"/>
|
||||
<Option type="4"/>
|
||||
<MakeCommands>
|
||||
<Build command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 rebuild_cache"/>
|
||||
<CompileFile command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 "$file""/>
|
||||
<Clean command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 clean"/>
|
||||
<DistClean command="nmake /NOLOGO /f <source_path>\Makefile VERBOSE=1 clean"/>
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
</Build>
|
||||
<Unit filename="<source_path>/main.cpp">
|
||||
<Option target="Test"/>
|
||||
</Unit>
|
||||
<Unit filename="<source_path>/CMakeLists.txt">
|
||||
<Option virtualFolder="CMake Files\"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef FOO_H
|
||||
#define FOO_H
|
||||
|
||||
#include "FooBar.h"
|
||||
|
||||
class Bar : public FooBar
|
||||
{
|
||||
};
|
||||
|
||||
#endif // FOO_H
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef BAR_H
|
||||
#define BAR_H
|
||||
|
||||
#include "FooBar.h"
|
||||
|
||||
class Foo : public FooBar
|
||||
{
|
||||
};
|
||||
|
||||
#endif // FOO_BAR_H
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef FOO_BAR_H
|
||||
#define FOO_BAR_H
|
||||
|
||||
class FooBar
|
||||
{
|
||||
};
|
||||
|
||||
#endif // FOO_BAR_H
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "Foo.h"
|
||||
#include "Bar.h"
|
||||
|
||||
void test()
|
||||
{
|
||||
Foo foo;
|
||||
Bar bar;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user