-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Absolutise pipespec paths (prepend CWD) when creating PipeSpec
Should fix #41 This already happened in gen-sh, but not when just running from .xml's. Now it should happen when actually reading the pipespec xml, regardless of how it's used. Note: When reading from archives, we assume paths are always relative.
- Loading branch information
Showing
4 changed files
with
87 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Test that we can run pipespec.xml's from other working directories. | ||
|
||
set -e | ||
if [[ ${BASH_VERSINFO[0]} -gt 4 | ||
|| ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -ge 4 ]]; then | ||
set -u | ||
# With bash <4.4, using ${a[@]} or ${a[*]} with an array without | ||
# any assigned elements when the nounset option is enabled will | ||
# throw an unbound variable error; so don't -u there | ||
fi | ||
|
||
cd "$(dirname "$0")"/../.. | ||
|
||
n="xml" | ||
src/divvun-validate-pipespec test/checker/pipespec.xml | ||
( | ||
set -x | ||
src/divvun-checker -s test/checker/pipespec.xml -n smegram < test/checker/input."$n".txt > test/checker/output."$n".json | ||
) | ||
if ! diff test/checker/output."$n".json test/checker/expected."$n".json; then | ||
echo diff test/checker/output."$n".json test/checker/expected."$n".json | ||
exit 1 | ||
fi |