summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llprocess_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/tests/llprocess_test.cpp')
-rw-r--r--indra/llcommon/tests/llprocess_test.cpp38
1 files changed, 36 insertions, 2 deletions
diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp
index e530975e86..54a1c55a2d 100644
--- a/indra/llcommon/tests/llprocess_test.cpp
+++ b/indra/llcommon/tests/llprocess_test.cpp
@@ -356,14 +356,22 @@ namespace tut
// Create a script file in a temporary place.
NamedTempFile script("py",
+ "from __future__ import print_function" EOL
"import sys" EOL
"import time" EOL
EOL
"time.sleep(2)" EOL
+<<<<<<< HEAD
+ "print('stdout after wait',file=sys.stdout)" EOL
+ "sys.stdout.flush()" EOL
+ "time.sleep(2)" EOL
+ "print('stderr after wait',file=sys.stderr)" EOL
+=======
"print('stdout after wait', file=sys.stdout)" EOL
"sys.stdout.flush()" EOL
"time.sleep(2)" EOL
"print('stderr after wait', file=sys.stderr)" EOL
+>>>>>>> 6ca09a94554ec01f5c94ec60fffd01d7e33f3546
"sys.stderr.flush()" EOL
);
@@ -572,12 +580,12 @@ namespace tut
{
set_test_name("arguments");
PythonProcessLauncher py(get_test_name(),
- "from __future__ import with_statement\n"
+ "from __future__ import with_statement, print_function\n"
"import sys\n"
// note nonstandard output-file arg!
"with open(sys.argv[3], 'w') as f:\n"
" for arg in sys.argv[1:]:\n"
- " print(arg, file=f)\n");
+ " print(arg,file=f)\n");
// We expect that PythonProcessLauncher has already appended
// its own NamedTempFile to mParams.args (sys.argv[0]).
py.mParams.args.add("first arg"); // sys.argv[1]
@@ -861,6 +869,10 @@ namespace tut
set_test_name("'bogus' test");
CaptureLog recorder;
PythonProcessLauncher py(get_test_name(),
+<<<<<<< HEAD
+ "from __future__ import print_function\n"
+=======
+>>>>>>> 6ca09a94554ec01f5c94ec60fffd01d7e33f3546
"print('Hello world')\n");
py.mParams.files.add(LLProcess::FileParam("bogus"));
py.mPy = LLProcess::create(py.mParams);
@@ -876,6 +888,10 @@ namespace tut
// Replace this test with one or more real 'file' tests when we
// implement 'file' support
PythonProcessLauncher py(get_test_name(),
+<<<<<<< HEAD
+ "from __future__ import print_function\n"
+=======
+>>>>>>> 6ca09a94554ec01f5c94ec60fffd01d7e33f3546
"print('Hello world')\n");
py.mParams.files.add(LLProcess::FileParam());
py.mParams.files.add(LLProcess::FileParam("file"));
@@ -891,6 +907,10 @@ namespace tut
// implement 'tpipe' support
CaptureLog recorder;
PythonProcessLauncher py(get_test_name(),
+<<<<<<< HEAD
+ "from __future__ import print_function\n"
+=======
+>>>>>>> 6ca09a94554ec01f5c94ec60fffd01d7e33f3546
"print('Hello world')\n");
py.mParams.files.add(LLProcess::FileParam());
py.mParams.files.add(LLProcess::FileParam("tpipe"));
@@ -908,6 +928,10 @@ namespace tut
// implement 'npipe' support
CaptureLog recorder;
PythonProcessLauncher py(get_test_name(),
+<<<<<<< HEAD
+ "from __future__ import print_function\n"
+=======
+>>>>>>> 6ca09a94554ec01f5c94ec60fffd01d7e33f3546
"print('Hello world')\n");
py.mParams.files.add(LLProcess::FileParam());
py.mParams.files.add(LLProcess::FileParam());
@@ -984,7 +1008,12 @@ namespace tut
{
set_test_name("get*Pipe() validation");
PythonProcessLauncher py(get_test_name(),
+<<<<<<< HEAD
+ "from __future__ import print_function\n"
+ "print('this output is expected')\n");
+=======
"print('this output is expected)'\n");
+>>>>>>> 6ca09a94554ec01f5c94ec60fffd01d7e33f3546
py.mParams.files.add(LLProcess::FileParam("pipe")); // pipe for stdin
py.mParams.files.add(LLProcess::FileParam()); // inherit stdout
py.mParams.files.add(LLProcess::FileParam("pipe")); // pipe for stderr
@@ -1004,6 +1033,7 @@ namespace tut
{
set_test_name("talk to stdin/stdout");
PythonProcessLauncher py(get_test_name(),
+ "from __future__ import print_function\n"
"import sys, time\n"
"print('ok')\n"
"sys.stdout.flush()\n"
@@ -1122,6 +1152,10 @@ namespace tut
{
set_test_name("ReadPipe \"eof\" event");
PythonProcessLauncher py(get_test_name(),
+<<<<<<< HEAD
+ "from __future__ import print_function\n"
+=======
+>>>>>>> 6ca09a94554ec01f5c94ec60fffd01d7e33f3546
"print('Hello from Python!')\n");
py.mParams.files.add(LLProcess::FileParam()); // stdin
py.mParams.files.add(LLProcess::FileParam("pipe")); // stdout