diff options
Diffstat (limited to 'indra/llcommon')
| -rw-r--r-- | indra/llcommon/tests/llleap_test.cpp | 11 | ||||
| -rw-r--r-- | indra/llcommon/tests/llprocess_test.cpp | 13 | 
2 files changed, 22 insertions, 2 deletions
| diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index e9edd165df..01515ecebf 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -193,11 +193,20 @@ namespace tut                                reader.getName().substr(0, reader.getName().length()-3))),              PYTHON(LLStringUtil::getenv("PYTHON"))          { +#if LL_WINDOWS +            // Weirdly, on GitHub Windows runners, plain 'python' works much +            // better than a full pathname. +            const char* RUNNER_TEMP = getenv("RUNNER_TEMP"); +            if (RUNNER_TEMP && *RUNNER_TEMP) +            { +                PYTHON = "python"; +            } +#endif              ensure("Set PYTHON to interpreter pathname", !PYTHON.empty());          }          NamedExtTempFile reader;          const std::string reader_module; -        const std::string PYTHON; +        std::string PYTHON;      };      typedef test_group<llleap_data> llleap_group;      typedef llleap_group::object object; diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp index a01ec84547..3ba3a8aab3 100644 --- a/indra/llcommon/tests/llprocess_test.cpp +++ b/indra/llcommon/tests/llprocess_test.cpp @@ -141,6 +141,15 @@ struct PythonProcessLauncher          mScript("py", script)      {          auto PYTHON(LLStringUtil::getenv("PYTHON")); +#if LL_WINDOWS +        // Weirdly, on GitHub Windows runners, plain 'python' works much better +        // than a full pathname. +        const char* RUNNER_TEMP = getenv("RUNNER_TEMP"); +        if (RUNNER_TEMP && *RUNNER_TEMP) +        { +            PYTHON = "python"; +        } +#endif          tut::ensure("Set $PYTHON to the Python interpreter", !PYTHON.empty());          mParams.desc = desc + " script"; @@ -1013,7 +1022,9 @@ namespace tut          set_test_name("get*Pipe() validation");          PythonProcessLauncher py(get_test_name(),              "from __future__ import print_function\n" -            "print('this output is expected')\n"); +            "import sys\n" +            "print('this output is expected')\n" +            "print('run by', sys.executable)\n");          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 | 
