https://github.com/stan-dev/stan
Revision f61fc89704a6886ce44ab0a24cc2d6e23d3dd785 authored by Daniel Lee on 15 January 2019, 07:18:43 UTC, committed by Daniel Lee on 17 May 2019, 01:54:30 UTC
1 parent f04f1ae
Raw File
Tip revision: f61fc89704a6886ce44ab0a24cc2d6e23d3dd785 authored by Daniel Lee on 15 January 2019, 07:18:43 UTC
updating generate_transitions
Tip revision: f61fc89
runTests.py
#!/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,"_test")
        if (mathRunTests.isWin()):
            name += mathRunTests.winsfx
            name = name.replace("\\","/")
    return name


def main():
    mathRunTests.mungeName = mungeName
    mathRunTests.main()


if __name__ == "__main__":
    main()
back to top