Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
8bfb74ca
Unverified
Commit
8bfb74ca
authored
6 years ago
by
Gigg, Martyn Anthony
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix MantidPlot ctest PYTHONPATH for Windows
parent
885caf22
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MantidPlot/CMakeLists.txt
+11
-2
11 additions, 2 deletions
MantidPlot/CMakeLists.txt
with
11 additions
and
2 deletions
MantidPlot/CMakeLists.txt
+
11
−
2
View file @
8bfb74ca
...
...
@@ -910,7 +910,16 @@ else ()
endif
()
# Add an environment property MANTID_SOURCE so that the script can find the source of xmlrunner
set
(
TEST_ENVIRONMENT
"MANTID_SOURCE=
${
CMAKE_SOURCE_DIR
}
;PYTHONPATH=$ENV{PYTHONPATH}:
${
PYTHON_XMLRUNNER_DIR
}
;MANTID_SCREENSHOT_REPORT=
${
SCREENSHOTS_DIR
}
"
)
if
(
${
CMAKE_SYSTEM_NAME
}
STREQUAL
"Windows"
)
set
(
_python_path $ENV{PYTHONPATH};
${
PYTHON_XMLRUNNER_DIR
}
)
# cmake list separator and Windows environment seprator are the same so escape the cmake one
string
(
REPLACE
";"
"
\\
;"
_python_path
"
${
_python_path
}
"
)
else
()
set
(
_python_path $ENV{PYTHONPATH}:
${
PYTHON_XMLRUNNER_DIR
}
)
endif
()
list
(
APPEND _test_environment
"PYTHONPATH=
${
_python_path
}
"
)
list
(
APPEND _test_environment
"MANTID_SOURCE=
${
CMAKE_SOURCE_DIR
}
"
)
list
(
APPEND _test_environment
"MANTID_SCREENSHOT_REPORT=
${
SCREENSHOTS_DIR
}
"
)
# Make a ctest target for each file
foreach
(
PYFILE
${
MANTIDPLOT_TEST_PY_FILES
}
)
# Add the test. Name of test = name of the file
...
...
@@ -918,7 +927,7 @@ foreach ( PYFILE ${MANTIDPLOT_TEST_PY_FILES} )
# Set the previously-built environment
set_tests_properties
(
${
PYFILE
}
PROPERTIES
RUN_SERIAL 1
ENVIRONMENT
"
${
TEST_ENVIRONMENT
}
"
ENVIRONMENT
"
${
_test_environment
}
"
TIMEOUT
${
TESTING_TIMEOUT
}
)
endforeach
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment