aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/docker-compose.yml13
-rw-r--r--test/docker/Dockerfile8
-rw-r--r--test/docker/docker-compose.yml10
-rwxr-xr-xtest/linux-home/test.sh (renamed from test/integration/test.sh)6
-rw-r--r--test/local/dirs/dest/1.txt (renamed from test/unit/dest/1.txt)0
-rw-r--r--test/local/dirs/dest/bar/3.txt (renamed from test/unit/dest/bar/3.txt)0
-rw-r--r--test/local/dirs/src/%DEST%/1.txt (renamed from test/unit/src/%DEST%/1.txt)0
-rw-r--r--test/local/dirs/src/%DEST%/bar/3.txt (renamed from test/unit/src/%DEST%/bar/3.txt)0
-rw-r--r--test/local/dirs/src/%DEST%/bar/baz/4.txt (renamed from test/unit/src/%DEST%/bar/baz/4.txt)0
-rw-r--r--test/local/dirs/src/%DEST%/foo/2.txt (renamed from test/unit/src/%DEST%/foo/2.txt)0
-rwxr-xr-xtest/local/test.sh (renamed from test/unit/test.sh)4
11 files changed, 24 insertions, 17 deletions
diff --git a/test/docker-compose.yml b/test/docker-compose.yml
deleted file mode 100644
index 76546c4..0000000
--- a/test/docker-compose.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-version: '3'
-services:
- test:
- build:
- context: docker/
- args:
- DISTRO: "${DISTRO:-xenial}"
- volumes:
- - ../:/src
- command:
- - sh
- - -c
- - /src/test/unit/test.sh && /src/test/integration/test.sh
diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile
index 5d4d016..04e66da 100644
--- a/test/docker/Dockerfile
+++ b/test/docker/Dockerfile
@@ -4,6 +4,12 @@ FROM ubuntu:$DISTRO
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
- apt-get install -y --no-install-recommends ca-certificates git
+ apt-get install -y --no-install-recommends ca-certificates git make
RUN git config --global --add safe.directory /src
+
+COPY [".", "/src"]
+
+WORKDIR /src
+
+CMD ["make", "test/local", "test/linux-home"]
diff --git a/test/docker/docker-compose.yml b/test/docker/docker-compose.yml
new file mode 100644
index 0000000..0689ad3
--- /dev/null
+++ b/test/docker/docker-compose.yml
@@ -0,0 +1,10 @@
+version: '3'
+services:
+ test:
+ build:
+ context: ../..
+ dockerfile: test/docker/Dockerfile
+ args:
+ DISTRO: "${DISTRO:-xenial}"
+ environment:
+ CI: y
diff --git a/test/integration/test.sh b/test/linux-home/test.sh
index f4b1028..edb2d5b 100755
--- a/test/integration/test.sh
+++ b/test/linux-home/test.sh
@@ -83,8 +83,12 @@ show_env() {
}
main() {
- show_env
+ if [ -z "${CI:+x}" ]; then
+ echo "$script_name: please don't run it outside of CI runs" >&2
+ exit 1
+ fi
+ show_env
test_my_dotfiles_work
}
diff --git a/test/unit/dest/1.txt b/test/local/dirs/dest/1.txt
index 3a2e3f4..3a2e3f4 100644
--- a/test/unit/dest/1.txt
+++ b/test/local/dirs/dest/1.txt
diff --git a/test/unit/dest/bar/3.txt b/test/local/dirs/dest/bar/3.txt
index a83d1d5..a83d1d5 100644
--- a/test/unit/dest/bar/3.txt
+++ b/test/local/dirs/dest/bar/3.txt
diff --git a/test/unit/src/%DEST%/1.txt b/test/local/dirs/src/%DEST%/1.txt
index d00491f..d00491f 100644
--- a/test/unit/src/%DEST%/1.txt
+++ b/test/local/dirs/src/%DEST%/1.txt
diff --git a/test/unit/src/%DEST%/bar/3.txt b/test/local/dirs/src/%DEST%/bar/3.txt
index 00750ed..00750ed 100644
--- a/test/unit/src/%DEST%/bar/3.txt
+++ b/test/local/dirs/src/%DEST%/bar/3.txt
diff --git a/test/unit/src/%DEST%/bar/baz/4.txt b/test/local/dirs/src/%DEST%/bar/baz/4.txt
index b8626c4..b8626c4 100644
--- a/test/unit/src/%DEST%/bar/baz/4.txt
+++ b/test/local/dirs/src/%DEST%/bar/baz/4.txt
diff --git a/test/unit/src/%DEST%/foo/2.txt b/test/local/dirs/src/%DEST%/foo/2.txt
index 0cfbf08..0cfbf08 100644
--- a/test/unit/src/%DEST%/foo/2.txt
+++ b/test/local/dirs/src/%DEST%/foo/2.txt
diff --git a/test/unit/test.sh b/test/local/test.sh
index f693aa1..99b426f 100755
--- a/test/unit/test.sh
+++ b/test/local/test.sh
@@ -17,9 +17,9 @@ readonly src_dir_name='src'
readonly dest_dir_name='dest'
readonly alt_dest_dir_name='alt_dest'
-src_dir_path="$script_dir/$src_dir_name"
+src_dir_path="$script_dir/dirs/$src_dir_name"
readonly src_dir_path
-dest_dir_path="$script_dir/$dest_dir_name"
+dest_dir_path="$script_dir/dirs/$dest_dir_name"
readonly dest_dir_path
test_root_dir=