* Added new Source Group type SourceGroupCustomCommand to UI and ProjectSettings * The Source Group executes a specified command on every source file * The variables $SOURCE_PATH, $PROJECT_PATH, $DB_PATH, $STORAGE_VERSION can be passed * The commands are executed after all other source groups finished indexing * The command is executed with working directory set to project directory * Errors during command execution are shown as status update and in the Status View * SourceGroupCustomCommand cannot be partially cleared, when one file needs clearing the project must be fully re-indexed
39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
* 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 "Custom" -> "Custom Command Source Group"
|
|
* Click "Next"
|
|
* Click "Next"
|
|
* Add "python add.py $PROJECT_PATH $DB_PATH $STORAGE_VERSION $SOURCE_PATH" to "Custom Command"
|
|
* Add "./src" to "Files & Directories to Index"
|
|
* Add "**excl.txt" to "Excluded Files & Directories"
|
|
* Add ".txt" to "Source File Extensions"
|
|
* Click "Next"
|
|
* Click "Create"
|
|
* Validate "All files" is the only option selectable
|
|
* Validate "source files to index" shows "3"
|
|
* Click "Start"
|
|
* Validate Project indexed without error
|
|
* Click "OK"
|
|
* Validate "out.txt" contains 3 lines:
|
|
<project_path.srctrlprj> <project_db_path.srctrldb_tmp> <storage_version> <source_path>/a.txt
|
|
<project_path.srctrlprj> <project_db_path.srctrldb_tmp> <storage_version> <source_path>/b.txt
|
|
<project_path.srctrlprj> <project_db_path.srctrldb_tmp> <storage_version> <source_path>/c.txt
|
|
* Press "Refresh" button
|
|
* Validate "Updated files" is selected
|
|
* Validate "source files to index" shows "3" again
|
|
* Click "Cancel"
|
|
* Click "Edit Project"
|
|
* Change "Custom Command" to "pyt add.py"
|
|
* Click "Next"
|
|
* Validate "Warning appears that $SOURCE_PATH is not defined in command"
|
|
* Change "Custom Command" to "pyt add.py $SOURCE_PATH"
|
|
* Click "Refresh" button
|
|
* Click "Start"
|
|
* Validate "Log View appears showing errors that command execution failed".
|
|
* Close Sourcetrail
|
|
* Run "2_teardown.sh"
|