File tree 2 files changed +23
-0
lines changed
main/java/com/google/devtools/build/lib/exec
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ public void logSpawn(
91
91
try {
92
92
for (Map .Entry <PathFragment , ActionInput > e : inputMap .entrySet ()) {
93
93
ActionInput input = e .getValue ();
94
+ if (input instanceof VirtualActionInput .EmptyActionInput ) {
95
+ continue ;
96
+ }
94
97
Path inputPath = execRoot .getRelative (input .getExecPathString ());
95
98
if (inputPath .isDirectory ()) {
96
99
listDirectoryContents (inputPath , builder ::addInputs , metadataProvider );
Original file line number Diff line number Diff line change 119
119
wc output || fail " no output produced"
120
120
}
121
121
122
+ function test_empty_file_in_runfiles() {
123
+ mkdir d
124
+ touch d/main.py
125
+ cat > BUILD << 'EOF '
126
+ py_binary(
127
+ name = "py_tool",
128
+ main = "d/main.py",
129
+ srcs = ["d/main.py"],
130
+ )
131
+ genrule(
132
+ name = "rule",
133
+ outs = ["out.txt"],
134
+ tools = [":py_tool"],
135
+ cmd = "echo hello > $(location out.txt)"
136
+ )
137
+ EOF
138
+ bazel build //:rule --experimental_execution_log_file output 2>&1 >> $TEST_log || fail " could not build"
139
+ [[ -e output ]] || fail " no output produced"
140
+ }
141
+
122
142
function test_negating_flags() {
123
143
cat > BUILD << 'EOF '
124
144
genrule(
You can’t perform that action at this time.
0 commit comments