• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2import feature ;
3import generators ;
4import modules ;
5import project ;
6import targets ;
7import testing ;
8import toolset ;
9import type ;
10
11alias line_compare_tool : ../../quickbook/test/src//line-compare-tool ;
12
13rule auto-index-test ( target-name : input-file : output-file ? : options * )
14{
15    local project = [ project.current ] ;
16
17    local t =
18        [ targets.create-typed-target RUN
19            : $(project)
20            : $(target-name)
21            : [ alias autoindex : ../build//auto_index : release ]
22            : $(requirements)
23                <location-prefix>$(target-name).test
24                <testing.arg>--prefix=../../..
25                <testing.arg>$(options)
26                <testing.arg>--in=$(input-file)
27                <testing.arg>--out=$(target-name).out
28                <preserve-test-targets>on
29                <dependency>Jamfile.v2
30                <dependency>$(input-file)
31        ]
32        ;
33
34    t +=
35        [ targets.create-typed-target RUN
36            : $(project)
37            : $(target-name)_check
38            : .//line_compare_tool
39            : $(requirements)
40                <location-prefix>$(target-name).test
41                <testing.arg>$(target-name).out
42                <testing.arg>$(target-name).gold
43                <preserve-test-targets>on
44                <dependency>$(target_name)
45                <implicit-dependency>$(target_name)
46                <dependency>Jamfile.v2
47                <dependency>$(input-file)
48        ]
49        ;
50
51    modules.poke testing : .all-tests : \$\(all-tests\) $(t) ;
52
53    return $(t) ;
54}
55
56auto-index-test test1 : type_traits.docbook : : --script=index.idx ;
57auto-index-test test2 : type_traits.docbook : : --internal-index --script=index.idx ;
58auto-index-test test3 : type_traits.docbook : : --internal-index --index-type=index --script=index.idx ;
59
60
61
62
63