util/disk_cache: turn MESA_GLSL_CACHE_DISABLE into a boolean

Instead of setting based on set/unset, allow users to use boolean values.
In the docs and tests, use `DISABLE=true` instead of `DISABLE=1` as it's
clearer IMO.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Eric Engestrom
2017-09-08 10:49:45 +01:00
parent 717fb6e4be
commit d861eb5fc2
3 changed files with 5 additions and 4 deletions

View File

@@ -156,9 +156,9 @@ test_disk_cache_create(void)
int err;
/* Before doing anything else, ensure that with
* MESA_GLSL_CACHE_DISABLE set, that disk_cache_create returns NULL.
* MESA_GLSL_CACHE_DISABLE set to true, that disk_cache_create returns NULL.
*/
setenv("MESA_GLSL_CACHE_DISABLE", "1", 1);
setenv("MESA_GLSL_CACHE_DISABLE", "true", 1);
cache = disk_cache_create("test", "make_check", 0);
expect_null(cache, "disk_cache_create with MESA_GLSL_CACHE_DISABLE set");