2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

Tests for more examples.

[SVN r33656]
This commit is contained in:
Vladimir Prus
2006-04-11 07:25:48 +00:00
parent aff8de18ab
commit b9e68f7dfd
4 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/python
# Copyright (C) Vladimir Prus 2006.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Test the 'libraries' example.
from BoostBuild import Tester, List
# Create a temporary working directory
t = Tester()
t.set_tree("../example/customization")
t.run_build_system()
t.expect_addition(["bin/$toolset/debug/codegen.exe",
"bin/$toolset/debug/usage.cpp"])
t.cleanup()

View File

@@ -0,0 +1,31 @@
#!/usr/bin/python
# Copyright (C) Vladimir Prus 2006.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Test the 'libraries' example.
from BoostBuild import Tester, List
import os
import string
# Create a temporary working directory
t = Tester()
t.set_tree("../example/gettext")
t.run_build_system(stderr=None)
t.expect_addition(["bin/$toolset/debug/main.exe",
"bin/$toolset/debug/russian.mo"])
file = t.adjust_names(["bin/$toolset/debug/main.exe"])[0]
input_fd = os.popen(file)
input = input_fd.read();
t.fail_test(string.find(input, "international hello") != 0)
t.cleanup()

20
v2/test/example_make.py Normal file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/python
# Copyright (C) Vladimir Prus 2006.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Test the 'libraries' example.
from BoostBuild import Tester, List
# Create a temporary working directory
t = Tester()
t.set_tree("../example/make")
t.run_build_system()
t.expect_addition(["bin/$toolset/debug/main.exe"])
t.cleanup()

View File

@@ -141,6 +141,7 @@ tests = [ "rebuilds",
"lib_source_property",
"implicit_dependency",
"example_libraries",
"example_make",
]
if os.name == 'posix':
@@ -159,6 +160,12 @@ if string.find(get_toolset(), 'gcc') == 0:
if "--extras" in sys.argv:
tests.append("boostbook")
tests.append("example_qt4")
# Requires ./whatever.py to work, so is
# not guaranted to work everywhere.
tests.append("example_customization")
# Requires gettext tools.
tests.append("example_gettext")
else:
print 'Note: skipping extra tests'