-
Notifications
You must be signed in to change notification settings - Fork 2
/
cmd.texp
67 lines (51 loc) · 1.44 KB
/
cmd.texp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
(let runcmd ./build/driver/cornerstone lib2/core.bb)
(let projname cornerstone)
(let test-exec (concat ./build/test/ (eval projname) _test))
(let run-exec (concat ./build/driver/ (eval projname)))
(rule run
(requires compile)
(run ./prog)
(with-args (capture name)
(requires build)
(run (eval run-exec) (eval name))))
(rule matcher
(requires compile)
(run ./build/matcher/matcher ints))
(rule default
(requires build)
(eval runcmd))
(rule gdb
(requires build)
(run gdb -q ./prog))
(rule test-gdb
(requires test-build)
(run gdb -q --args (eval test-exec) --gtest_color=yes))
(rule typer
(requires test-build)
(run ./build/typer/typer ../backbone-test/backbone/argcall.bb))
(rule compile
(requires build)
(run (eval runcmd) (output ./prog.ll))
(run clang -Wno-override-module prog.ll -o prog))
(rule mem
(requires compile)
(run valgrind ./prog))
(rule build
(if (not (call isdir ./build)) (mkdir build))
(in ./build (do
(run cmake -DGTEST=False ..)
(run make -j8))))
(rule test-build
(if (not (call isdir ./build)) (mkdir build))
(in ./build (do
(run cmake -DGTEST=Test ..)
(run make -j8))))
(rule test
(requires test-build)
(run (eval test-exec) --gtest_color=yes)
(with-args (exact list)
(run (eval test-exec) --gtest_list_tests))
(with-args (capture test-filter)
(run (eval test-exec) (concat --gtest_filter='* (eval test-filter) *'))))
(rule clean
(run rm -rf build))