From c1d9261b3801897ba9b3fef5a79e73d5459d2cf1 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 4 Apr 2020 22:18:21 +0300 Subject: Make use of project configuration variables for tests --- tests/build/root.build | 23 +++++++++++++++++++++++ tests/ci.testscript | 11 +---------- tests/publish.testscript | 11 +---------- 3 files changed, 25 insertions(+), 20 deletions(-) (limited to 'tests') diff --git a/tests/build/root.build b/tests/build/root.build index f0a353d..6199d8d 100644 --- a/tests/build/root.build +++ b/tests/build/root.build @@ -1,6 +1,29 @@ # file : tests/build/root.build # license : MIT; see accompanying LICENSE file +# Server to use for the CI request submissions simulation. Use the empty +# string to disable the CI tests (which require network access). +# +# Note that by default we test against the ci-dir handler on stage and the +# ci-load handler on public (thus it's not ci.stage.build2.org). +# +config [string] config.bdep.tests.ci.server ?= \ + ($build.version.stage \ + ? 'https://stage.build2.org' \ + : 'https://ci.cppget.org') + +# Repository to use for the package submissions simulation. Use the empty +# string to disable the package submission tests (which require network +# access). +# +# Note that by default we test against the submit-dir handler on stage and the +# submit-git handler on public. +# +config [string] config.bdep.tests.publish.repository ?= \ + ($build.version.stage \ + ? 'https://stage.build2.org' \ + : 'https://cppget.org') + # We need to configure C/C++ modules to pass the compiler paths to some of # bdep test commands. # diff --git a/tests/ci.testscript b/tests/ci.testscript index d1302c0..962b161 100644 --- a/tests/ci.testscript +++ b/tests/ci.testscript @@ -11,16 +11,7 @@ exit end -# Server to use for the CI request submissions simulation. -# -# Note that the empty config.bdep.test.repository value is used to suppress -# these tests (which require network access). -# -server = ($config.bdep.test.repository == [null] \ - ? ($build.version.stage \ - ? 'https://stage.build2.org' \ - : 'https://ci.cppget.org') \ - : "$config.bdep.test.repository") +server = $config.bdep.tests.ci.server +if ("$server" == '') exit diff --git a/tests/publish.testscript b/tests/publish.testscript index 6d2eec1..fa32521 100644 --- a/tests/publish.testscript +++ b/tests/publish.testscript @@ -11,16 +11,7 @@ exit end -# Repository to use for the package submissions simulation. -# -# 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 \ - ? 'https://stage.build2.org' \ - : 'https://cppget.org') \ - : "$config.bdep.test.repository") +repository = $config.bdep.tests.publish.repository +if ("$repository" == '') exit -- cgit v1.1