Skip to content

Commit 0d27f76

Browse files
committed
[lldb][test] Fix TestUseSourceCache for readonly source trees
TestUseSourceCache attempts to write to a build artifact copied from the source tree, and asserts the write succeeded. If the source tree is read only, the copy will also be read only, causing it to fail. When producing the build artifact, ensure that it is writable. I use `chmod` as a build step to do this, but I believe that is linuxish-only thing, so I excluded this extra command for Windows.
1 parent b5bcdb5 commit 0d27f76

File tree

1 file changed

+3
-0
lines changed
  • lldb/test/API/commands/settings/use_source_cache

1 file changed

+3
-0
lines changed

lldb/test/API/commands/settings/use_source_cache/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ include Makefile.rules
66
# Copy file into the build folder to enable the test to modify it.
77
main-copy.cpp: main.cpp
88
cp -f $< $@
9+
ifneq "$(OS)" "Windows_NT" # chmod is not available on Windows
10+
chmod u+w $@
11+
endif

0 commit comments

Comments
 (0)