Skip to content
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

Update tests to use rtools-provided make #3281

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pipeline {
}
post {
always {
recordIssues(
recordIssues(
id: "lint_doc_checks",
name: "Linting & Doc checks",
enabledForFailure: true,
Expand Down Expand Up @@ -264,8 +264,8 @@ pipeline {
SET \"PATH=C:\\PROGRA~1\\R\\R-4.1.2\\bin;%PATH%\"
SET \"PATH=C:\\PROGRA~1\\Microsoft^ MPI\\Bin;%PATH%\"
SET \"MPI_HOME=C:\\PROGRA~1\\Microsoft^ MPI\\Bin\"
mingw32-make.exe -f lib/stan_math/make/standalone math-libs
mingw32-make.exe -j${PARALLEL} test-headers
make.exe -f lib/stan_math/make/standalone math-libs
make.exe -j${PARALLEL} test-headers
"""
setupCXX(false, WIN_CXX, stanc3_bin_url())
runTestsWin("src/test/unit")
Expand Down Expand Up @@ -448,7 +448,7 @@ pipeline {
SET \"PATH=C:\\PROGRA~1\\Microsoft^ MPI\\Bin;%PATH%\"
SET \"MPI_HOME=C:\\PROGRA~1\\Microsoft^ MPI\\Bin\"
cd performance-tests-cmdstan/cmdstan
mingw32-make.exe -j${PARALLEL} build
make.exe -j${PARALLEL} build
cd ..
python ./runPerformanceTests.py -j${PARALLEL} ${integration_tests_flags()}--runs=0 stanc3/test/integration/good
python ./runPerformanceTests.py -j${PARALLEL} ${integration_tests_flags()}--runs=0 example-models
Expand Down Expand Up @@ -496,7 +496,7 @@ pipeline {
post {
always {
node("linux") {
recordIssues(
recordIssues(
id: "pipeline",
name: "Entire pipeline results",
enabledForFailure: true,
Expand Down
5 changes: 4 additions & 1 deletion make/tests
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,15 @@ HEADER_TESTS := $(addsuffix -test,$(call findfiles,src/stan,*.hpp))

ifeq ($(OS),Windows_NT)
DEV_NULL = nul
ifeq ($(IS_UCRT),true)
UCRT_NULL_FLAG = -S
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this flag do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an issue with the UCRT toolchain recognising the nul device, we previously discussed it in this Math library PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, guess that one slipped my memory. Sounds good!

endif
else
DEV_NULL = /dev/null
endif

%.hpp-test : %.hpp test/dummy.cpp
$(COMPILE.cpp) -O0 -include $^ -o $(DEV_NULL)
$(COMPILE.cpp) -O0 -include $^ $(UCRT_NULL_FLAG) -o $(DEV_NULL)

test/dummy.cpp:
@mkdir -p test
Expand Down
2 changes: 0 additions & 2 deletions runTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ def doCommand(command, exit_on_failure=True):
"""Run command as a shell command and report/exit on errors."""
print("------------------------------------------------------------")
print("%s" % command)
if isWin() and command.startswith("make "):
command = command.replace("make ", "mingw32-make ")
p1 = subprocess.Popen(command, shell=True)
p1.wait()
if exit_on_failure and (not (p1.returncode is None) and not (p1.returncode == 0)):
Expand Down
Loading