From e84c4283ac58d15ba27c51b1093c7969d7a4fc4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Dalleau?= <frederic.dalleau@collabora.co.uk> Date: Fri, 6 Jul 2018 12:29:59 +0000 Subject: [PATCH] README: Describe usage of common-subtree.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frédéric Dalleau <frederic.dalleau@collabora.co.uk> --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d7c9f1..db4ccc7 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,28 @@ Common files shared accross apertis tests. Those files are shared through a git subtree which is included by all test projects. -Use common-subtree.sh to add the subtree in a tests repository +Use `common-subtree.sh add` to add the subtree in a tests repository. +For example: +``` +# Retrieve the common-subtree.sh script, we use `git`, but could also use `wget` +$ git clone git@gitlab.apertis.org:tests/common + +# Clone the test repository if needed +$ git clone git@gitlab.apertis.org:tests/iptables-basic +# Enter the test directory +$ cd iptables-basic + +# In the test directory, add the common git subtree +$ ../common/common-subtree.sh add + +# A new commit has been created, push the test with the subtree initialized +$ git push origin +``` + +If a script is supposed to be in the common/ directory, it should be commited in the +[common repository](https://gitlab.apertis.org/tests/common), and then it can be pulled +into the git subtree using the command: +``` +$ ../common/common-subtree.sh pull + +``` -- GitLab