Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat: add flag
ensure
that allows to annotate that certain output f…
…iles should be non-empty or agree with a given checksum (#1651) * feat: add flag for marking output files as expected to be non empty. * docs * test case * update docs * update tests * update test * fixes * docs * fix error handling * ensure that testcase runs properly on windows
- Loading branch information
1 parent
1ae85c6
commit 76f69d9
Showing
8 changed files
with
171 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ | |
repeat, | ||
report, | ||
multiext, | ||
ensure, | ||
IOFile, | ||
sourcecache_entry, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
shell.executable("bash") | ||
|
||
rule a: | ||
output: | ||
ensure("test.txt", non_empty=True) | ||
shell: | ||
"touch {output}" | ||
|
||
|
||
rule b: | ||
output: | ||
ensure("test2.txt", non_empty=True) | ||
shell: | ||
"echo test > {output}" | ||
|
||
|
||
sha256 = "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" | ||
|
||
|
||
rule c: | ||
output: | ||
ensure("test3.txt", sha256=sha256) | ||
shell: | ||
"echo -n test > {output}" | ||
|
||
|
||
rule d: | ||
output: | ||
ensure("test4.txt", sha256=lambda w: sha256) | ||
shell: | ||
"echo -n test2 > {output}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters