Skip to content

Commit

Permalink
Fix: AIX/Solaris use python3.8 in UT (#294)
Browse files Browse the repository at this point in the history
Signed-off-by: Evgeny Malygin <[email protected]>
  • Loading branch information
678098 authored May 17, 2024
1 parent ef0508c commit a2237dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/groups/mwc/mwcsys/mwcsys_executil.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,19 @@ static void test2_executeSystemFailure()
int rc;

PVV("Testing abnormal exit of the command");

#if defined(BSLS_PLATFORM_OS_SOLARIS) || defined(BSLS_PLATFORM_OS_AIX)
// For AIX/Solaris, python2 support is stopped, and alias `python3`
// doesn't exist. The final supported release is 3.8.
rc = mwcsys::ExecUtil::execute(&output,
"python3.8 -c 'import os,signal; "
"os.kill(os.getpid(), signal.SIGKILL)'");
#else
rc = mwcsys::ExecUtil::execute(&output,
"python3 -c 'import os,signal; "
"os.kill(os.getpid(), signal.SIGKILL)'");
#endif

ASSERT_EQ(rc, -2);
ASSERT_EQ(output, "");

Expand Down

0 comments on commit a2237dd

Please sign in to comment.