forked from stan-dev/stan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runTests.py
executable file
·36 lines (29 loc) · 805 Bytes
/
runTests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/python
"""
replacement for runtest target in Makefile
"""
import os
import os.path
import platform
import sys
import subprocess
import time
import imp
mathRunTests = imp.load_source('runTests',
os.path.join(os.path.dirname(os.path.abspath(__file__)),
"lib", "stan_math", "runTests.py"))
# set up good makefile target name
def mungeName(name):
if (name.startswith("src")):
name = name.replace("src/","",1)
if (name.endswith(mathRunTests.testsfx)):
name = name.replace(mathRunTests.testsfx,"")
if (mathRunTests.isWin()):
name += mathRunTests.winsfx
name = name.replace("\\","/")
return name
def main():
mathRunTests.mungeName = mungeName
mathRunTests.main()
if __name__ == "__main__":
main()