From 4dcc23bc30429fbc60625c004b701b9105c70b95 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Thu, 14 May 2015 10:13:01 +0000 Subject: yarns: Add a test for `morph generate-manifest-csv` Change-Id: I54d1a03ba37f7589783f41c02482c0ac1821508d --- yarns/branches-workspaces.yarn | 9 +++++++++ yarns/implementations.yarn | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'yarns') 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' -- cgit v1.2.1