Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 56 lines (45 sloc) 1.875 kB
862af26 @xdenser added nodeunit and 1 test
authored
1 import Options, Utils
b8d642d @xdenser first commit
authored
2 from os import unlink, symlink, popen
3 from os.path import exists
4
5 srcdir = '.'
6 blddir = 'build'
f11e4e0 @xdenser version boost
authored
7 VERSION = '0.0.9'
b8d642d @xdenser first commit
authored
8
9 def set_options(opt):
10 opt.tool_options('compiler_cxx')
11
12 def configure(conf):
13 conf.check_tool('compiler_cxx')
14 conf.check_tool('node_addon')
15
aeb734b @xdenser fix to make script
authored
16 fb_config = conf.find_program('fb_config', var='FB_CONFIG')
17 if not fb_config:
18 fb_libdir = "-L/usr/lib -lfbclient"
19 fb_includedir = "-I/usr/include/"
20 else:
21 fb_libdir = popen("%s --libs" % fb_config).readline().strip()
22 fb_includedir = popen("%s --cflags" % fb_config).readline().strip()
b8d642d @xdenser first commit
authored
23 conf.env.append_value("LIBPATH_FB", fb_libdir)
24 conf.env.append_value("LIB_FB", "fbclient")
25 conf.env.append_value("CPPPATH_FB", fb_includedir)
26
e34af5b start of dividing c++ code to one class per source file
den authored
27 def buildo(bldo):
28 obj = bldo.new_task_gen('cxx', 'shlib', 'node_addon')
29 obj.target = 'binding'
30 obj.source = "./src/binding.cc"
31 obj.uselib = "FB"
32
b8d642d @xdenser first commit
authored
33 def build(bld):
34 obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
35 obj.target = 'binding'
ccb0eb8 @xdenser continue with addition of prepared statements
authored
36 obj.source = "./src/fb-bindings.cc ./src/fb-bindings-connection.cc ./src/fb-bindings-eventblock.cc ./src/fb-bindings-fbeventemitter.cc ./src/fb-bindings-fbresult.cc ./src/fb-bindings-blob.cc ./src/fb-bindings-statement.cc"
b8d642d @xdenser first commit
authored
37 obj.uselib = "FB"
38
862af26 @xdenser added nodeunit and 1 test
authored
39 def test(tst):
40 node_binary = 'node'
41
42 if not exists('./tools/nodeunit/bin/nodeunit'):
43 print("\033[31mNodeunit doesn't exists.\033[39m\nYou should run `git submodule update --init` before run tests.")
44 exit(1)
45 else:
71a96c1 @xdenser events debug messages
authored
46 Utils.exec_command(node_binary + ' ./tools/nodeunit/bin/nodeunit tests/def')
47
84cbda3 @xdenser event_buffer refactored like in ibpp
authored
48 def test_current(tstc):
71a96c1 @xdenser events debug messages
authored
49 node_binary = 'node'
50
51 if not exists('./tools/nodeunit/bin/nodeunit'):
52 print("\033[31mNodeunit doesn't exists.\033[39m\nYou should run `git submodule update --init` before run tests.")
53 exit(1)
54 else:
84cbda3 @xdenser event_buffer refactored like in ibpp
authored
55 Utils.exec_command(node_binary + ' ./tools/nodeunit/bin/nodeunit tests/current')
Something went wrong with that request. Please try again.