-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape special characters #1862
Escape special characters #1862
Conversation
cmake/NeuronTestHelper.cmake
Outdated
@@ -143,6 +143,8 @@ function(nrn_add_test_group) | |||
# Add a rule to build the modfiles for this test group. Multiple groups may ask for exactly the | |||
# same thing (testcorenrn), so it's worth deduplicating. | |||
set(hash_components ${NRN_ADD_TEST_GROUP_NRNIVMODL_ARGS}) | |||
# Escape special characters (problematic with Windows paths when calling nrnivmodl) | |||
string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" NRN_RUN_FROM_BUILD_DIR_ENV "${NRN_RUN_FROM_BUILD_DIR_ENV}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jorblancoa : could you copy here the problematic path here in this comment? (as an example / as a future reference)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cd /home/jblanco/repos/nrn_master/build/test/nrnivmodl/0a0cdc56d575785edb29649a19eac3b04e88c22c708b0f82d85d347bab8d189a && cmake -E env LD_LIBRARY_PATH=/home/jblanco/repos/nrn_master/build/lib: NEURONHOME=/home/jblanco/repos/nrn_master/build/share/nrn NRNHOME=/home/jblanco/repos/nrn_master/build PATH=/home/jblanco/repos/nrn_master/build/bin:/home/jblanco/.local/bin:/home/jblanco/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/System32/Wbem:/mnt/c/windows/System32/WindowsPowerShell/v1.0/:/mnt/c/windows/System32/OpenSSH/:/mnt/c/Program\ Files\ (x86)/NVIDIA\ Corporation/PhysX/Common:/mnt/c/Program\ Files/NVIDIA\ Corporation/NVIDIA\ NvDLISR:/mnt/c/Users/nanak/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/nanak/AppData/Local/Programs/Microsoft\ VS\ Code/bin:/mnt/c/Work/nrn/bin:/mnt/c/Work/nrn/mingw/usr/bin:/snap/bin:/home/jblanco/.fzf/bin PYTHONPATH=/home/jblanco/repos/nrn_master/build/lib/python:/home/jblanco/repos/nrn_master/test/rxd: /home/jblanco/repos/nrn_master/build/bin/nrnivmodl .
/bin/sh: 1: Syntax error: "(" unexpected
As you can see the spaces are escaped but the "(" and ")" are not
/mnt/c/Program\ Files\ (x86)/NVIDIA\ Corporation/PhysX/Common
Codecov Report
@@ Coverage Diff @@
## master #1862 +/- ##
=======================================
Coverage 47.12% 47.12%
=======================================
Files 543 543
Lines 112964 112964
=======================================
Hits 53239 53239
Misses 59725 59725 📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
✔️ 90e28a9 -> Azure artifacts URL |
* Escape special characters for problematic Windows paths when calling nrnivmodl
* Escape special characters for problematic Windows paths when calling nrnivmodl
* Escape special characters for problematic Windows paths when calling nrnivmodl
Escape characters is needed when compiling with cmake in WSL and nrnivmodl is called passing Windows paths with parenthesis.
Solves #1770