diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-05-14 10:13:01 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2015-05-20 14:01:14 +0000 |
commit | 4dcc23bc30429fbc60625c004b701b9105c70b95 (patch) | |
tree | a910c3c0cb65de3c7053fe5032d184af0c896e27 | |
parent | 6fd766d2b071f301ace520dacda89713dd9a91d9 (diff) | |
download | morph-4dcc23bc30429fbc60625c004b701b9105c70b95.tar.gz |
yarns: Add a test for `morph generate-manifest-csv`
Change-Id: I54d1a03ba37f7589783f41c02482c0ac1821508d
-rw-r--r-- | yarns/branches-workspaces.yarn | 9 | ||||
-rw-r--r-- | yarns/implementations.yarn | 11 |
2 files changed, 19 insertions, 1 deletions
diff --git a/yarns/branches-workspaces.yarn b/yarns/branches-workspaces.yarn index fa6e815c..492bd102 100644 --- a/yarns/branches-workspaces.yarn +++ b/yarns/branches-workspaces.yarn @@ -614,6 +614,15 @@ Generating a manifest works WHEN morph generates a manifest THEN the manifest is generated +A CSV manifest can also be generated. + + SCENARIO morph generates a csv manifest + GIVEN a git server + + WHEN morph generates a manifest for system systems/test-system.morph at ref HEAD in repository test:morphs + THEN morph succeeded + AND the csv manifest is generated + Definition diffing ------------------ diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index d11f8752..3e076f59 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -719,13 +719,22 @@ Generating a manifest. IMPLEMENTS WHEN morph generates a manifest run_morph generate-manifest-genivi "$DATADIR/artifact.tar" > "$DATADIR/manifest" - IMPLEMENTS THEN the manifest is generated + IMPLEMENTS WHEN morph generates a manifest for system (\S+) at ref (\S+) in repository (\S+) + cd "$DATADIR" + attempt_morph generate-manifest-csv --check-license=single-file "$MATCH_3" "$MATCH_2" "$MATCH_1" + IMPLEMENTS THEN the manifest is generated # Generated manifest should contain the name of the repository if ! grep -q hello_world "$DATADIR/manifest"; then die "Output isn't what we expect" fi + IMPLEMENTS THEN the csv manifest is generated + if [ -e "$DATADIR"/*-manifest.csv ]; then + exit 0 + fi + die "Expected CSV manifest not found" + IMPLEMENTS WHEN the user commits all changes in system branch (\S+) cd "$DATADIR/workspace/$MATCH_1/test/morphs" git commit -a --allow-empty -m 'Commit all changes' |