summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/tests/cache_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/tests/cache_test.c')
-rw-r--r--src/compiler/glsl/tests/cache_test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/glsl/tests/cache_test.c b/src/compiler/glsl/tests/cache_test.c
index f53ef0de145..0ef05aacb26 100644
--- a/src/compiler/glsl/tests/cache_test.c
+++ b/src/compiler/glsl/tests/cache_test.c
@@ -37,6 +37,8 @@
bool error = false;
+#ifdef ENABLE_SHADER_CACHE
+
static void
expect_equal(uint64_t actual, uint64_t expected, const char *test)
{
@@ -378,10 +380,12 @@ test_put_key_and_get_key(void)
disk_cache_destroy(cache);
}
+#endif /* ENABLE_SHADER_CACHE */
int
main(void)
{
+#ifdef ENABLE_SHADER_CACHE
int err;
test_disk_cache_create();
@@ -392,6 +396,7 @@ main(void)
err = rmrf_local(CACHE_TEST_TMP);
expect_equal(err, 0, "Removing " CACHE_TEST_TMP " again");
+#endif /* ENABLE_SHADER_CACHE */
return error ? 1 : 0;
}