summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llleap_test.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-07-08 14:08:16 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-07-08 14:08:16 -0400
commit7dc6211ad5ea83685a35c6fff740278343aa8b9d (patch)
treefeeae360c11d30e9c12bf1fd01898d1537c49af5 /indra/llcommon/tests/llleap_test.cpp
parentca4288edaa226507e2a44182689a167bd4ea7948 (diff)
SL-18837: Force llprocess_test and llleap_test to use just 'python'.
On GitHub Windows runners, trying to make build.yaml set PYTHON=python in the environment doesn't work: integration tests still fail with "Access is denied" because they're still trying to execute the interpreter's full pathname. Instead, make llprocess_test and llleap_test detect the case of GitHub Windows and override the environment variable PYTHON with a baked-in string constant "python".
Diffstat (limited to 'indra/llcommon/tests/llleap_test.cpp')
-rw-r--r--indra/llcommon/tests/llleap_test.cpp11
1 files changed, 10 insertions, 1 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;