aboutsummaryrefslogtreecommitdiff
path: root/tests/publish.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-08-25 20:42:44 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-08-28 23:30:37 +0300
commit2abd895682ec8707f30fc6babbf3787e00a8c280 (patch)
treef214eddd5150da7e92097118d6d63278fed98575 /tests/publish.test
parentfe6aa3aa87bdff77ca667e012a9d1cc34f1fb8ea (diff)
Implement CI request submission
Diffstat (limited to 'tests/publish.test')
-rw-r--r--tests/publish.test26
1 files changed, 15 insertions, 11 deletions
diff --git a/tests/publish.test b/tests/publish.test
index 4756abc..ba88e9a 100644
--- a/tests/publish.test
+++ b/tests/publish.test
@@ -14,8 +14,8 @@ end
# Repository to use for the package submissions simulation.
#
-# Note: could use empty config.bdep.test.repository value to suppress
-# these test (which require network access).
+# Note that the empty config.bdep.test.repository value is used to suppress
+# these tests (which require network access).
#
repository = ($config.bdep.test.repository == [null] \
? ($build.version.stage \
@@ -23,6 +23,10 @@ repository = ($config.bdep.test.repository == [null] \
: 'https://cppget.org') \
: "$config.bdep.test.repository")
++if ("$repository" == '')
+ exit
+end
+
test.arguments += --repository "$repository" --yes \
--author-name user --author-email user@example.com
@@ -49,7 +53,7 @@ windows = ($cxx.target.class == 'windows')
{
test.arguments += --simulate 'success'
- : basic
+ : single-cfg
:
{
$clone_root_prj;
@@ -205,7 +209,7 @@ windows = ($cxx.target.class == 'windows')
submitting prj-1.0.6.tar.gz
%.*
error: submission handling failed
- % info: consider reporting this to .+ repository maintainers%
+ % info: consider reporting this to .+ maintainers%
EOE
}
@@ -224,7 +228,7 @@ windows = ($cxx.target.class == 'windows')
submitting prj-1.0.7.tar.gz
%.*
error: HTTP status code 500 (internal server error)
- % info: consider reporting this to .+ repository maintainers%
+ % info: consider reporting this to .+ maintainers%
EOE
}
}
@@ -237,19 +241,19 @@ windows = ($cxx.target.class == 'windows')
# simulation. We specify it to enable the control branch-related
# functionality.
#
- test.arguments += --simulate 'success' --control "http://example.com/rep.git"
+ test.arguments += --simulate 'success' --control 'http://example.com/rep.git'
# Create the remote repository.
#
+mkdir --no-cleanup prj.git
- +git -C prj.git init --bar >! &prj.git/***
+ +git -C prj.git init --bare >! &prj.git/***
+$clone_prj
g = git -C prj >! 2>!
- +$g config user.name "Test Script"
- +$g config user.email "testscript@example.com"
+ +$g config user.name 'Test Script'
+ +$g config user.email 'testscript@example.com'
clone_rep = cp --no-cleanup -r ../prj.git ./ &prj.git/***
clone_prj = cp --no-cleanup -r ../prj ./ &prj/***
@@ -365,8 +369,8 @@ windows = ($cxx.target.class == 'windows')
git clone "$rep" prj2 &prj2/*** 2>&1 | \
sed -e 's/warning: (remote HEAD refers to nonexistent .*)/info: \1/' >&2 2>!;
- $g2 config user.name "Test Script";
- $g2 config user.email "testscript@example.com";
+ $g2 config user.name 'Test Script';
+ $g2 config user.email 'testscript@example.com';
$g2 checkout -b build2-control --track origin/build2-control;
$g2 commit --allow-empty -m 'Dummy1';
$g2 push;