aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/02_src_spec.sh6
-rwxr-xr-xtests/repository/dummy-pkg/build4
-rw-r--r--tests/repository/dummy-pkg/checksums0
-rw-r--r--tests/repository/dummy-pkg/version1
4 files changed, 11 insertions, 0 deletions
diff --git a/spec/02_src_spec.sh b/spec/02_src_spec.sh
index 626c7b3..b97fe3c 100644
--- a/spec/02_src_spec.sh
+++ b/spec/02_src_spec.sh
@@ -1,5 +1,11 @@
Describe 'Main toolchain'
export PATH=$PWD/src:$PATH
+ export CPT_ROOT=$PWD/tests
+ export CPT_PATH=$PWD/tests/repository
+ install_dummy() { CPT_HOOK='' ./src/cpt bi dummy-pkg ;}
+ remove_dummy() { rm -rf "${CPT_ROOT:?}/var" ;}
+ BeforeAll install_dummy
+ AfterAll remove_dummy
Describe 'cpt'
diff --git a/tests/repository/dummy-pkg/build b/tests/repository/dummy-pkg/build
new file mode 100755
index 0000000..d37d964
--- /dev/null
+++ b/tests/repository/dummy-pkg/build
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+# Check that we are receiving 3 arguments
+[ "$3" ] || exit 1
diff --git a/tests/repository/dummy-pkg/checksums b/tests/repository/dummy-pkg/checksums
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/repository/dummy-pkg/checksums
diff --git a/tests/repository/dummy-pkg/version b/tests/repository/dummy-pkg/version
new file mode 100644
index 0000000..2fb73a0
--- /dev/null
+++ b/tests/repository/dummy-pkg/version
@@ -0,0 +1 @@
+1 1