Skip to content

Commit

Permalink
STAT: Fixed issue with incorrect PWD passed by VS-Code to terminal in…
Browse files Browse the repository at this point in the history
… REH

In REH-based Linux the VS-Code workspace had issues with relative paths
used for CWD of build-tasks. The problem got fixed by proper manipulation
of CWD field of the generated VS-Code workspace.

Signed-off-by: Arseniy Aharonov <[email protected]>
  • Loading branch information
are-scenic committed Dec 2, 2020
1 parent 9db5cb7 commit e6b38ec
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Regression

on:
push:
branches: [master, develop, feature/**]
branches: [master, develop, feature/**, bugfix/**]
paths-ignore: ['docs/**', '*.md']
pull_request:
branches: [master]
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ Release name format: [2.2.1] - 2020-02-02

None

## [2.1.2] - 2020-12-12

## Fixed

- In REH-based Linux the VS-Code workspace had issues with relative paths used for CWD of build-tasks

## [2.1.1] - 2020-11-24

### Added
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,13 @@ An open source project thrives on contribution of different people, and it may c
- Eitan Talianker
[![GitHub](https://img.shields.io/badge/@etalianker-blue.svg?style=social&logo=GitHub)](https://github.com/etalianker)
- Dr. Eitan Farchi
[![GitHub](https://img.shields.io/badge/@[email protected]?style=social&logo=IBM)](mailto:[email protected])
[![GitHub](https://img.shields.io/badge/[email protected]?style=social&logo=IBM)](mailto:[email protected])
- Udi Arie
[![GitHub](https://img.shields.io/badge/@udiarie-blue.svg?style=social&logo=GitHub)](https://github.com/udiarie)
- Oran DeBotton
[![GitHub](https://img.shields.io/badge/[email protected]@SolarEdge.com-blue.svg?style=social)](mailto:[email protected])
- Oran DeBotton
[![GitHub](https://img.shields.io/badge/[email protected]?style=social)](mailto:[email protected])
- Luna Benarroch
[![GitHub](https://img.shields.io/badge/[email protected]?style=social&logo=IBM)](mailto:[email protected])

### 6.2. Imported Components

Expand Down
2 changes: 1 addition & 1 deletion stat_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# SPDX-License-Identifier: MIT

# ----------------------------------------------------------------------------------------------------------------------
VERSION = '2.1.1'
VERSION = '2.1.2'

WEB_URL = "https://github.com/westerndigitalcorporation/stat#3-usage"
RESOURCES_DIRECTORY = 'resources'
Expand Down
8 changes: 4 additions & 4 deletions tests/test_vscode_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _getExpectedSettings(self):
"debug.inlineValues": True,
"debug.showBreakpointsInOverviewRuler": True,
"debug.toolBarLocation": "docked",
"terminal.integrated.cwd": "${workspaceFolder}/../../",
"terminal.integrated.cwd": "${workspaceFolder}/../..",
"C_Cpp.default.includePath": includes,
"C_Cpp.default.defines": self.makefileProject.definitions,
# "files.exclude": {"**/node_modules": True,},
Expand Down Expand Up @@ -98,13 +98,13 @@ def _getExpectedTaskConfigurations(self):
"isDefault": True
},
"options": {
"cwd": "../.."
"cwd": "${workspaceFolder}/../.."
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"../.."
"${workspaceFolder}/../.."
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
Expand All @@ -130,7 +130,7 @@ def _getExpectedTaskConfigurations(self):
"command": self.makeTool,
"args": self.makeArguments + ["clean"],
"options": {
"cwd": "../.."
"cwd": "${workspaceFolder}/../.."
},
"problemMatcher": []
},
Expand Down
6 changes: 3 additions & 3 deletions vscode_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __buildSettings(self):
"debug.inlineValues": True,
"debug.showBreakpointsInOverviewRuler": True,
"debug.toolBarLocation": "docked",
"terminal.integrated.cwd": "${workspaceFolder}/../../",
"terminal.integrated.cwd": "${workspaceFolder}/../..",
"C_Cpp.default.includePath": includes,
"C_Cpp.default.defines": defines,
}
Expand Down Expand Up @@ -92,7 +92,7 @@ def __buildTaskConfigurations(self):
"command": command[0],
"args": command[1:],
"options": {
"cwd": "../.."
"cwd": "${workspaceFolder}/../.."
},
"problemMatcher": []
}
Expand All @@ -102,7 +102,7 @@ def __buildTaskConfigurations(self):
build["args"].remove("clean")
build["problemMatcher"] = {
"owner": "cpp",
"fileLocation": ["relative", "../.."],
"fileLocation": ["relative", "${workspaceFolder}/../.."],
"pattern": {"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1, "line": 2, "column": 3, "severity": 4, "message": 5}
}
Expand Down

0 comments on commit e6b38ec

Please sign in to comment.