[pyAgrum] add a flag for pyAgrum test in debug or release mode

parent b715668c
......@@ -172,7 +172,7 @@ def getPost(current, target):
if cfg.os_platform == "win32":
line = 'copy /Y "wrappers\pyAgrum\Release\_pyAgrum.pyd" "wrappers\pyAgrum\." & ' + cfg.python + " ..\\..\\wrappers\\pyAgrum\\testunits\\"+gumTest
else:
line = cfg.python + " ../../wrappers/pyAgrum/testunits/"+gumTest
line = cfg.python + " ../../wrappers/pyAgrum/testunits/"+gumTest+" "+current['mode']
return line, True
return "", False
......
......@@ -31,7 +31,7 @@ from tests import AggregatorsForBNTestSuite
from tests import PRMexplorerTestSuite
from tests import AllIncrementalInferenceTestSuite
from tests import LazyPropagationTestSuite
from tests import GibbsTestSuite
from tests import SamplingTestSuite
from tests import LoopyBeliefPropagationTestSuite
import time
......@@ -51,7 +51,7 @@ tests = list()
#tests.append(BNLearnerTestSuite.ts)
#tests.append(AggregatorsForBNTestSuite.ts)
#tests.append(PRMexplorerTestSuite.ts)
tests.append(GibbsTestSuite.ts)
tests.append(SamplingTestSuite.ts)
#tests.append(LoopyBeliefPropagationTestSuite.ts)
tests = unittest.TestSuite(tests)
......
......@@ -6,7 +6,16 @@ import sys
from sys import platform as os_platform
os.chdir(os.path.dirname(__file__ if __file__[0] == '/' else "./" + __file__))
libagrum = os.path.abspath("../../../build/release/wrappers")
mod="release"
if len(sys.argv)>1:
mod=sys.argv[1]
print("Mode detected : "+mod)
if mod=="debug":
libagrum = os.path.abspath("../../../build/debug/wrappers")
else:
libagrum = os.path.abspath("../../../build/release/wrappers")
sys.path.insert(0, libagrum) # to force to use local pyAgrum for the tests (and not installed one)
import pyAgrum as gum
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment