shell: move global variables before session setup

4 jobs for shell_setup in 32 minutes and 24 seconds (queued for 1 second)
Status Job ID Name Coverage
  Style
passed #39099
check_style

00:00:20

 
  Tests
passed #39100
run_tests:source

00:30:34

32.0%
 
  Build
passed #39101
create_doc:reference

00:01:28

passed #39102
create_doc:user

00:01:10