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:
23
v2/test/example_customization.py
Normal file
23
v2/test/example_customization.py
Normal 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()
|
||||
31
v2/test/example_gettext.py
Normal file
31
v2/test/example_gettext.py
Normal 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
20
v2/test/example_make.py
Normal 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()
|
||||
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user