Skip to content

Commit 56cf45a

Browse files
committed
[Cache][SPIRV] Fix flacky test... again
The underlying issue was that I forgot to clean the cache directory before running the test. So the test ended up running sometimes on a dirty cache yielding bad fails. Since the code is only running a single comgr action that only converts spirv->bc, the contents of the cache should be 2 files: * the bitcode * the cache timestamp
1 parent a96f44c commit 56cf45a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

amd/comgr/test-lit/spirv-translator-cached.cl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// REQUIRES: comgr-has-spirv
22
// COM: Same as spirv-translator but with the cache
3+
// RUN: rm -fr %t.cache
34

45
// COM: Generate a spirv-targeted LLVM IR file from an OpenCL kernel
56
// RUN: clang -c -emit-llvm --target=spirv64 %S/spirv-translator.cl -o %t.bc
@@ -11,12 +12,12 @@
1112
// RUN: export AMD_COMGR_CACHE=1
1213
// RUN: AMD_COMGR_CACHE_DIR=%t.cache spirv-translator %t.spv -o %t.translated.bc
1314
// RUN: COUNT=$(ls "%t.cache" | wc -l)
14-
// RUN: [ 3 -eq $COUNT ]
15+
// RUN: [ 2 -eq $COUNT ]
1516

1617
// COM: Run again and check that the cache contents haven't changed
1718
// RUN: AMD_COMGR_CACHE_DIR=%t.cache spirv-translator %t.spv -o %t.translated.again.bc
1819
// RUN: COUNT=$(ls "%t.cache" | wc -l)
19-
// RUN: [ 3 -eq $COUNT ]
20+
// RUN: [ 2 -eq $COUNT ]
2021

2122
// COM: Dissasemble LLVM IR bitcode to LLVM IR text
2223
// RUN: llvm-dis %t.translated.bc -o - | FileCheck %S/spirv-translator.cl

0 commit comments

Comments
 (0)