mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
Unbreak notfile.py
[SVN r35916]
This commit is contained in:
@@ -522,7 +522,22 @@ class Tester(TestCmd.TestCmd):
|
||||
print 'FAILED'
|
||||
print '------- The following changes were unexpected ------- '
|
||||
self.unexpected_difference.pprint()
|
||||
self.fail_test(1)
|
||||
self.fail_test(1)
|
||||
|
||||
def expect_output_line(self, expected):
|
||||
expected = expected.strip()
|
||||
lines = self.stdout().splitlines()
|
||||
found = 0
|
||||
for line in lines:
|
||||
line = line.strip()
|
||||
if fnmatch.fnmatch(line, expected):
|
||||
found = 1
|
||||
break
|
||||
|
||||
if not found:
|
||||
print "Did not found expected line in output:"
|
||||
print expected
|
||||
self.fail_test(1)
|
||||
|
||||
def expect_content(self, name, content, exact=0):
|
||||
name = self.adjust_names(name)[0]
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
from BoostBuild import Tester, List
|
||||
import string
|
||||
import os
|
||||
import fnmatch
|
||||
|
||||
t = Tester()
|
||||
|
||||
@@ -48,7 +49,7 @@ t.fail_test(string.find(t.stdout(), "echo hi") == -1)
|
||||
name = t.adjust_names(["bin/$toolset/debug/hello.exe"])[0]
|
||||
name = apply(os.path.join, string.split(name, "/"));
|
||||
c = "valgrind " + name
|
||||
t.fail_test(string.find(t.stdout(), c) == -1)
|
||||
t.expect_output_line(c)
|
||||
|
||||
|
||||
t.cleanup()
|
||||
|
||||
Reference in New Issue
Block a user