diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/boost/tools/build/test/core_action_output.py | |
parent | Initial commit. (diff) | |
download | ceph-upstream/18.2.2.tar.xz ceph-upstream/18.2.2.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/tools/build/test/core_action_output.py')
-rwxr-xr-x | src/boost/tools/build/test/core_action_output.py | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/boost/tools/build/test/core_action_output.py b/src/boost/tools/build/test/core_action_output.py new file mode 100755 index 000000000..52d5e43e7 --- /dev/null +++ b/src/boost/tools/build/test/core_action_output.py @@ -0,0 +1,62 @@ +#!/usr/bin/python + +# Copyright 2012. Jurko Gospodnetic +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Test correct "-p" option handling. + +import BoostBuild + +t = BoostBuild.Tester(["-d1"], pass_toolset=False) + +t.write("file.jam", """\ +prefix = "echo \\"" ; +suffix = "\\"" ; +if $(NT) +{ + prefix = "(echo " ; + suffix = ")" ; +} +actions go +{ + $(prefix)stdout$(suffix) + >&2 $(prefix)stderr$(suffix) +} +ECHO "{{{" $(XXX) "}}}" ; +ALWAYS all ; +go all ; +""") + +t.run_build_system(["-ffile.jam", "-sXXX=1"], stderr="") +t.expect_output_lines("{{{ 1 }}}") +t.expect_output_lines("stdout") +t.expect_output_lines("stderr") +t.expect_nothing_more() + +t.run_build_system(["-ffile.jam", "-sXXX=2", "-p0"], stderr="") +t.expect_output_lines("{{{ 2 }}}") +t.expect_output_lines("stdout") +t.expect_output_lines("stderr") +t.expect_nothing_more() + +t.run_build_system(["-ffile.jam", "-sXXX=3", "-p1"], stderr="") +t.expect_output_lines("{{{ 3 }}}") +t.expect_output_lines("stdout") +t.expect_output_lines("stderr*", False) +t.expect_nothing_more() + +t.run_build_system(["-ffile.jam", "-sXXX=4", "-p2"], stderr="stderr\n") +t.expect_output_lines("{{{ 4 }}}") +t.expect_output_lines("stdout*", False) +t.expect_output_lines("stderr*", False) +t.expect_nothing_more() + +t.run_build_system(["-ffile.jam", "-sXXX=5", "-p3"], stderr="stderr\n") +t.expect_output_lines("{{{ 5 }}}") +t.expect_output_lines("stdout") +t.expect_output_lines("stderr*", False) +t.expect_nothing_more() + +t.cleanup() |