summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-04-16 03:23:33 (GMT)
committerAlexey Neyman <stilor@att.net>2018-04-16 03:24:39 (GMT)
commit345dc4161d937c302248ea34ea55a9abc4bf343d (patch)
tree88a932353f8dc19342b674cc57dee4bae39dd3ee /testing
parent0d7822e7963a7c445ba3bebd8125f26b415c21c7 (diff)
Testing works for archlinux docker
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'testing')
-rwxr-xr-xtesting/docker/common-scripts/ctng-build-all10
-rwxr-xr-xtesting/docker/common-scripts/ctng-test-all12
-rwxr-xr-xtesting/docker/common-scripts/su-as-user3
-rwxr-xr-xtesting/docker/dmgr.sh3
4 files changed, 16 insertions, 12 deletions
diff --git a/testing/docker/common-scripts/ctng-build-all b/testing/docker/common-scripts/ctng-build-all
deleted file mode 100755
index f29093a..0000000
--- a/testing/docker/common-scripts/ctng-build-all
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-set -e
-cd
-rm -rf bld-ctng
-mkdir bld-ctng
-cd bld-ctng
-/crosstool-ng/configure --prefix=$HOME/inst-ctng
-make
-make install
diff --git a/testing/docker/common-scripts/ctng-test-all b/testing/docker/common-scripts/ctng-test-all
new file mode 100755
index 0000000..f0ba266
--- /dev/null
+++ b/testing/docker/common-scripts/ctng-test-all
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+cd
+rm -rf bld-samples
+mkdir bld-samples
+cd bld-samples
+export PATH=$HOME/inst-ctng/bin:$PATH
+ct-ng help
+ct-ng list-samples
+ct-ng list-steps
+ct-ng build-all
diff --git a/testing/docker/common-scripts/su-as-user b/testing/docker/common-scripts/su-as-user
index 7f262ac..99246f2 100755
--- a/testing/docker/common-scripts/su-as-user
+++ b/testing/docker/common-scripts/su-as-user
@@ -8,8 +8,9 @@ shift 4
groupadd -g ${gid} ${grp}
useradd -d /home/${usr} -m -g ${gid} -u ${uid} ${usr}
+ln -sf /src /home/${usr}/src
if [ -z "$*" ]; then
exec su -l ${usr}
else
- exec su -l -c "/bin/bash -c '$*'"
+ exec su -l -c "/bin/bash -c '$*'" ${usr}
fi
diff --git a/testing/docker/dmgr.sh b/testing/docker/dmgr.sh
index 6d88d51..5dbb8b2 100755
--- a/testing/docker/dmgr.sh
+++ b/testing/docker/dmgr.sh
@@ -51,6 +51,7 @@ _dckr()
-v `pwd`/common-scripts:/setup-scripts:ro \
-v ${topdir}:/crosstool-ng:ro \
-v `pwd`/build-${cntr}:/home \
+ -v $HOME/src:/src:ro \
ctng-${cntr} \
/setup-scripts/su-as-user `id -un` `id -u` `id -gn` `id -g` "$@"
}
@@ -64,7 +65,7 @@ action_test()
msg "Setting up crosstool-NG in ${cntr}"
_dckr "${cntr}" /setup-scripts/ctng-install
msg "Running build-all in ${cntr}"
- _dckr "${cntr}" /setup-scripts/ctng-build-all
+ _dckr "${cntr}" /setup-scripts/ctng-test-all
}
# Enter the container using the same user account/environment as for testing.