Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/notfile.py @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 902 bytes
Line 
1#!/usr/bin/python
2
3#  Copyright (C) Vladimir Prus 2005.
4#  Distributed under the Boost Software License, Version 1.0. (See
5#  accompanying file LICENSE_1_0.txt or copy at
6#  http://www.boost.org/LICENSE_1_0.txt)
7
8#  Basic tests for the 'notfile' rule.
9
10from BoostBuild import Tester, List
11import string
12import os
13import fnmatch
14
15t = Tester()
16
17t.write("Jamroot", """
18import notfile ;
19
20notfile say : "echo hi" ;
21
22exe hello : hello.cpp ;
23notfile hello_valgrind : @valgrind : hello ;
24
25actions valgrind
26{
27   valgrind $(>)
28}
29
30""")
31
32t.write("hello.cpp", """
33
34#include <iostream>
35
36int main()
37{
38    std::cout << "Hello!\\n";
39    return 1;
40}
41
42""")
43
44
45t.run_build_system("-n -d+2")
46
47t.fail_test(string.find(t.stdout(), "echo hi") == -1)
48
49name = t.adjust_names(["bin/$toolset/debug/hello.exe"])[0]
50name = apply(os.path.join, string.split(name, "/"));
51c = "valgrind " + name
52t.expect_output_line(c)
53
54
55t.cleanup()
56
Note: See TracBrowser for help on using the repository browser.