# -*- python -*-
from lsst.sconsUtils import scripts, env, targets

pybind11_test_modules = ['testTableArchivesLib']

scripts.BasicSConscript.pybind11(pybind11_test_modules)

afwdataDir = env.ProductDir("afwdata")

if not afwdataDir:
        testArgs = dict(statistics = "--run_test=!StatisticsTestImages",
                        background = "--run_test=!BackgroundTestImages",)
        scripts.BasicSConscript.tests(noBuildList=[name + '.cc' for name in pybind11_test_modules],
                                      args=testArgs)
else:
        # copy AFWDATA_DIR to the test's environment
        env["ENV"]["AFWDATA_DIR"] = afwdataDir
        scripts.BasicSConscript.tests(noBuildList=[name + '.cc' for name in pybind11_test_modules])

env.Clean(targets["tests"], "#testTable.fits")
