Skip to content
Snippets Groups Projects
  • Simon McVittie's avatar
    000b8dc0
    tests: Don't look at the real environment for driver_environment() · 000b8dc0
    Simon McVittie authored
    
    If one of the variables we are interested in happens to be set
    already, and doesn't get overridden, then the test will fail.
    For example, `DRI_PRIME=1 meson test -C _build` would fail.
    
    This will become a lot more likely to happen when I start logging
    ubiquitous environment variables like `DISPLAY`.
    
    We can't just set envp = NULL initially, because g_environ_setenv()
    in Ubuntu 12.04 won't accept NULL as a valid environment block (although
    newer versions do).
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
    000b8dc0
    History
    tests: Don't look at the real environment for driver_environment()
    Simon McVittie authored
    
    If one of the variables we are interested in happens to be set
    already, and doesn't get overridden, then the test will fail.
    For example, `DRI_PRIME=1 meson test -C _build` would fail.
    
    This will become a lot more likely to happen when I start logging
    ubiquitous environment variables like `DISPLAY`.
    
    We can't just set envp = NULL initially, because g_environ_setenv()
    in Ubuntu 12.04 won't accept NULL as a valid environment block (although
    newer versions do).
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>