1#!/usr/bin/python 2 3# Copyright (C) Vladimir Prus 2005. 4# Distributed under the Boost Software License, Version 1.0. 5# (See 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 10import BoostBuild 11import os 12 13t = BoostBuild.Tester() 14 15t.write("jamroot.jam", """\ 16import notfile ; 17notfile say : "echo hi" ; 18exe hello : hello.cpp ; 19notfile hello_valgrind : @valgrind : hello ; 20actions valgrind { valgrind $(>[1]) } 21""") 22 23t.write("hello.cpp", """\ 24#include <iostream> 25int main() { std::cout << "Hello!\\n"; } 26""") 27 28t.run_build_system(["-n", "-d+2"]) 29 30t.fail_test(t.stdout().find("echo hi") == -1) 31 32name = t.adjust_names("bin/$toolset/debug*/hello.exe")[0] 33name = os.path.join(*name.split("/")) 34t.expect_output_lines(" valgrind *%s " % name) 35 36t.cleanup() 37