Skip to content

Commit 37e663a

Browse files
author
David Ungar
committed
fail-with-bad-deps-fine
1 parent 2f7fc65 commit 37e663a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
Binary file not shown.
Binary file not shown.

test/Driver/Dependencies/Inputs/update-dependencies-bad.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
returncode = subprocess.call([sys.argv[1], "--from-yaml",
4242
"--input-filename=" + primaryFile,
4343
"--output-filename=" + depsFile])
44+
# If the input is not valid YAML, just copy it over verbatim;
45+
# we're testing a case where we produced a corrupted output file.
4446
if returncode != 0:
45-
shutil.rmtree(depsFile, True)
46-
print("Failed to convert", os.path.basename(primaryFile))
47-
exit(1)
47+
shutil.copyfile(primaryFile, depsFile)
4848
except ValueError:
4949
pass
5050

test/Driver/Dependencies/Inputs/update-dependencies.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
"--input-filename=" + primaryFile,
4949
"--output-filename=" + depsFile])
5050
if returncode != 0:
51-
shutil.rmtree(depsFile, True)
52-
print("Failed to convert", os.path.basename(primaryFile))
53-
exit(1)
51+
# If the input is not valid YAML, just copy it over verbatim;
52+
# we're testing a case where we produced a corrupted output file.
53+
shutil.copyfile(primaryFile, depsFile)
5454
else:
5555
primaryFile = None
5656

0 commit comments

Comments
 (0)