
from slabcore import *
import os

env = Environment( )
env.Tool( 'slabc' )
env.Tool('python')

lm = env.LoadableModule( "_test_slab.so", 
                         [ 
                          "test_slab.c",
                          "slab_test_dict.c",
                          "slab_test_list.c",
                          "test_environ.c",
                          "slab_test_options.c",
                          ] 
                         )

python = env.WhereIs("python", os.environ['PATH'] )
test = env.Command( "__test", ['test_slab.py',lm] , "$python $SOURCE", python=python )

def testing_preaction(target,source,env):
    print "#"*50
    print "testing c api"
    print "#"*50

def testing_postaction(target,source,env):
    print "#"*50
    print "Finished testing c api"
    print "#"*50


AddPreAction( test, Action( testing_preaction, "") )
AddPostAction( test, Action( testing_postaction, "") )
Alias('test', test )