Skip to content

Commit

Permalink
test: add recipeRelative import scm test
Browse files Browse the repository at this point in the history
  • Loading branch information
jkloetzke committed Jan 8, 2025
1 parent 56cd6b1 commit 4a6ef0c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/black-box/import-scm-relative/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bobMinimumVersion: "0.25"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello World
7 changes: 7 additions & 0 deletions test/black-box/import-scm-relative/recipes/sub/root.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root: True
checkoutSCM:
scm: import
url: data
recipeRelative: True
buildScript: cp -a "$1/"* .
packageScript: cp -a "$1/"* .
18 changes: 18 additions & 0 deletions test/black-box/import-scm-relative/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash -e
#
# Test recipeRelative "import" SCM property
#
. ../../test-lib.sh 2>/dev/null || { echo "Must run in script directory!" ; exit 1 ; }

cleanup

# First try in-tree build
run_bob dev sub::root
diff -Nrq recipes/sub/data dev/dist/sub/root/1/workspace

# Out of tree builds should work as well
build="$(mktemp -d)"
trap 'rm -rf "$build"' EXIT
run_bob init . "$build"
run_bob -C "$build" dev sub::root
diff -Nrq recipes/sub/data "$build/dev/dist/sub/root/1/workspace"

0 comments on commit 4a6ef0c

Please sign in to comment.