-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_ctest.py
19 lines (16 loc) · 858 Bytes
/
run_ctest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/python
# -*- coding: utf-8 -*-
import platform
import os
import subprocess
if __name__ == "__main__":
# Figure out path of our own cmake install
CITOOLS_PATH = os.path.join(os.getcwd(), "ci-tools")
CMAKE_PATH = os.path.join(CITOOLS_PATH, "cmake")
if platform.system() == "Linux":
os.environ["PATH"] = os.path.join(CMAKE_PATH, "bin")+":"+os.environ.get("PATH", os.path.join(CMAKE_PATH, "bin"))
elif platform.system() == "Windows":
os.environ["PATH"] = os.path.join(CMAKE_PATH, "bin")+";"+os.environ.get("PATH", os.path.join(CMAKE_PATH, "bin"))
elif platform.system() == "Darwin":
os.environ["PATH"] = os.path.join(CMAKE_PATH, "CMake.app", "Contents", "bin")+":"+os.environ.get("PATH", os.path.join(CMAKE_PATH, "bin"))
subprocess.check_call("ctest -VV -S ci-tools/run_ctest.cmake", shell=True)