[Tarantool-patches] [PATCH luajit 6/6] test: skip test for getenv in 309-os.t

Sergey Ostanevich sergos at tarantool.org
Sat Mar 13 21:50:04 MSK 2021


Hi!

Thanks for the patch!

Shall we consider an environment being set in cmake dedicated to the Tarantool’s
testing?

Regards,
Sergos


> On 12 Mar 2021, at 08:27, Sergey Kaplun <skaplun at tarantool.org> wrote:
> 
> Inside Tarantool's GiHub-CI there is not defined variable LOGNAME nor
                      t               ^^^ no 
> USERNAME. This leads to failed test inside CI, because a string is
                          test failure
> expected.
> 
> This test is skipped when this variable is `nil`.
> 
> Part of tarantool/tarantool#5844
> Part of tarantool/tarantool#4473
> ---
> test/lua-Harness-tests/309-os.t | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/test/lua-Harness-tests/309-os.t b/test/lua-Harness-tests/309-os.t
> index f94db00..6b3ea4d 100755
> --- a/test/lua-Harness-tests/309-os.t
> +++ b/test/lua-Harness-tests/309-os.t
> @@ -170,7 +170,11 @@ do -- getenv
>     is(os.getenv('__IMPROBABLE__'), nil, "function getenv")
> 
>     local user = os.getenv('LOGNAME') or os.getenv('USERNAME')
> -    type_ok(user, 'string', "function getenv")
> +    if not user then
> +        skip("no LOGNAME and USERNAME")
> +    else
> +        type_ok(user, 'string', "function getenv")
> +    end
> end
> 
> do -- remove
> -- 
> 2.28.0
> 



More information about the Tarantool-patches mailing list