2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-11 23:52:20 +00:00
Files
build/test/gcc_runtime.py
Vladimir Prus 90c3f1170f Fix detection of exit status. We use close on pipe to get return status
and if program does exit(1) we get '1'. The code for checking was
using os.WIFSIGNALLED, and that returns true for '1' -- it seems like
it is expecting result of os.system, which would be 256, or something.


[SVN r62634]
2010-06-09 07:09:29 +00:00

34 lines
823 B
Python

#!/usr/bin/python
# Copyright 2004 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Tests that on gcc, we correctly report problem when static runtime is
# requested for building a shared library.
import BoostBuild
import string
t = BoostBuild.Tester()
# Create the needed files.
t.write("jamroot.jam", "")
t.write("jamfile.jam", """
lib hello : hello.cpp ;
""")
t.write("hello.cpp", """
int main() { }
""")
t.run_build_system("runtime-link=static")
t.fail_test(string.find(t.stdout(),
"On gcc, DLL can't be build with '<runtime-link>static'") == -1)
t.run_build_system("link=static runtime-link=static")
t.expect_addition("bin/$toolset/debug/link-static/runtime-link-static/hello.lib")
t.cleanup()