]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/toolset-mock/src/mock-program.cpp
62dd4b8a44a452e82302f5c02dc373b7fd40f42c
3 // Copyright (c) 2017 Steven Watanabe
5 // Distributed under the Boost Software License Version 1.0. (See
6 // accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // This program does nothing except to exec a python script
24 #error PY_SCRIPT must be defined to the absolute path to the script to run
28 #error PYTHON_CMD must be defined to the absolute path to the python interpreter
31 int main(int argc
, char ** argv
)
33 std::vector
<char *> args
;
34 char python_cmd
[] = PYTHON_CMD
;
35 char script
[] = PY_SCRIPT
;
36 args
.push_back(python_cmd
);
37 args
.push_back(script
);
38 args
.insert(args
.end(), argv
+ 1, argv
+ argc
);
40 execv(python_cmd
, &args
[0]);