diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-07-07 20:02:31 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-07-07 20:02:31 +0300 |
commit | fbcdab1afc8af7001ed2ade6bb972d559cd55553 (patch) | |
tree | b28a1827d5e88ef23e0fb697a912fe025d7b9974 | |
parent | f9cef3e7cebc66605e12a784c2439708650c6f19 (diff) |
Use [cmdline] type for canned commands in testscripts
-rw-r--r-- | tests/common.testscript | 40 | ||||
-rw-r--r-- | tests/config.testscript | 4 | ||||
-rw-r--r-- | tests/pkg-build.testscript | 8 | ||||
-rw-r--r-- | tests/pkg-drop.testscript | 2 | ||||
-rw-r--r-- | tests/pkg-status.testscript | 2 | ||||
-rw-r--r-- | tests/remote-git.testscript | 3 | ||||
-rw-r--r-- | tests/rep-auth.testscript | 6 | ||||
-rw-r--r-- | tests/rep-create.testscript | 8 | ||||
-rw-r--r-- | tests/rep-fetch-git-refname.testscript | 2 | ||||
-rw-r--r-- | tests/rep-info.testscript | 2 | ||||
-rw-r--r-- | tests/rep-list.testscript | 2 | ||||
-rw-r--r-- | tests/rep-remove.testscript | 2 |
12 files changed, 41 insertions, 40 deletions
diff --git a/tests/common.testscript b/tests/common.testscript index 25671c6..17174d9 100644 --- a/tests/common.testscript +++ b/tests/common.testscript @@ -32,26 +32,26 @@ test.options += --default-options $options_guard \ # (for example, to make sure that configuration post-test state is valid and is # as expected). # -cfg_create = $* cfg-create -cfg_info = $* cfg-info -cfg_link = $* cfg-link -cfg_unlink = $* cfg-unlink -pkg_build = $* pkg-build -pkg_checkout = $* pkg-checkout -pkg_configure = $* pkg-configure -pkg_disfigure = $* pkg-disfigure -pkg_drop = $* pkg-drop -pkg_fetch = $* pkg-fetch -pkg_purge = $* pkg-purge -pkg_status = $* pkg-status -pkg_unpack = $* pkg-unpack -pkg_update = $* pkg-update -rep_add = $* rep-add -rep_create = $* rep-create -rep_fetch = $* rep-fetch -rep_info = $* rep-info -rep_list = $* rep-list -rep_remove = $* rep-remove +cfg_create = [cmdline] $* cfg-create +cfg_info = [cmdline] $* cfg-info +cfg_link = [cmdline] $* cfg-link +cfg_unlink = [cmdline] $* cfg-unlink +pkg_build = [cmdline] $* pkg-build +pkg_checkout = [cmdline] $* pkg-checkout +pkg_configure = [cmdline] $* pkg-configure +pkg_disfigure = [cmdline] $* pkg-disfigure +pkg_drop = [cmdline] $* pkg-drop +pkg_fetch = [cmdline] $* pkg-fetch +pkg_purge = [cmdline] $* pkg-purge +pkg_status = [cmdline] $* pkg-status +pkg_unpack = [cmdline] $* pkg-unpack +pkg_update = [cmdline] $* pkg-update +rep_add = [cmdline] $* rep-add +rep_create = [cmdline] $* rep-create +rep_fetch = [cmdline] $* rep-fetch +rep_info = [cmdline] $* rep-info +rep_list = [cmdline] $* rep-list +rep_remove = [cmdline] $* rep-remove # All testscripts are named after bpkg commands, for example # pkg-verify.testscript. So the testscript scope id is a name of the command diff --git a/tests/config.testscript b/tests/config.testscript index 0bcfb93..70eef42 100644 --- a/tests/config.testscript +++ b/tests/config.testscript @@ -14,12 +14,12 @@ # The most commonly used configuration cloning command that copies it from the # parent scope working directory. # -clone_cfg = cp -pr ../cfg ./ +clone_cfg = [cmdline] cp -pr ../cfg ./ # Clones the original (presumably empty) configuration from the root scope # working directory. # -clone_root_cfg = cp -pr $~/cfg ./ +clone_root_cfg = [cmdline] cp -pr $~/cfg ./ # Setup a test command to use a cloned configuration directory by default. # diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index 8934a50..fe2e4b2 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -3428,7 +3428,7 @@ test.options += --no-progress configured libbar/0.0.2 EOE - clone_cfg = cp --no-cleanup -r ../cfg ./ &cfg/*** + clone_cfg = [cmdline] cp --no-cleanup -r ../cfg ./ &cfg/*** : immediate : @@ -13539,7 +13539,7 @@ test.options += --no-progress configured libfix/0.0.3 EOE - clone_cfg = cp --no-cleanup -r ../cfg ./ &cfg/*** + clone_cfg = [cmdline] cp --no-cleanup -r ../cfg ./ &cfg/*** : explicitly : @@ -13662,7 +13662,7 @@ test.options += --no-progress configured libbaz/0.0.3 EOE - clone_cfg = cp --no-cleanup -r ../cfg ./ &cfg/*** + clone_cfg = [cmdline] cp --no-cleanup -r ../cfg ./ &cfg/*** : explicit : @@ -14216,7 +14216,7 @@ test.options += --no-progress : Test that libhello is fully rebuilt, as the resulted package is not : external. { - clone_cfg = cp -pr --no-cleanup ../../cfg ./ + clone_cfg = [cmdline] cp -pr --no-cleanup ../../cfg ./ # Distribute using the dedicated configuration to avoid the 'c and cxx # module toolchain pattern mismatch' warning. diff --git a/tests/pkg-drop.testscript b/tests/pkg-drop.testscript index 8a7672c..9029970 100644 --- a/tests/pkg-drop.testscript +++ b/tests/pkg-drop.testscript @@ -442,7 +442,7 @@ $* libfoo/1.0.0 2>>~%EOE% != 0 : linked-configs : { - pkg_build = $0 pkg-build --yes 2>! + pkg_build = [cmdline] $0 pkg-build --yes 2>! : 3-configs : diff --git a/tests/pkg-status.testscript b/tests/pkg-status.testscript index e90e3bf..885b0fb 100644 --- a/tests/pkg-status.testscript +++ b/tests/pkg-status.testscript @@ -40,7 +40,7 @@ cp -r $src/testing $out/testing cp -r $src/unstable $out/unstable - c = $rep_create 2>! + c = [cmdline] $rep_create 2>! $c $out/extra &$out/extra/packages.manifest $c $out/stable &$out/stable/packages.manifest diff --git a/tests/remote-git.testscript b/tests/remote-git.testscript index 0885abd..b4ed398 100644 --- a/tests/remote-git.testscript +++ b/tests/remote-git.testscript @@ -72,6 +72,7 @@ end # will use the same options as we do for unpacking of package archives (see # pkg-unpack.cxx). # -git_extract = ($cxx.target.class != 'windows' \ +git_extract = [cmdline] \ + ($cxx.target.class != 'windows' \ ? tar -C $out_git -xf \ : tar -C $regex.replace($out_git, '\\', '/') --force-local -xf) diff --git a/tests/rep-auth.testscript b/tests/rep-auth.testscript index ee86327..5d51857 100644 --- a/tests/rep-auth.testscript +++ b/tests/rep-auth.testscript @@ -24,7 +24,7 @@ # Prepare repositories used by tests if running in the local mode. # +if! $remote - rc = $rep_create 2>! + rc = [cmdline] $rep_create 2>! # Create the 'unsigned1' repository. # @@ -128,8 +128,8 @@ rep_fetch += -d cfg # Check if rep-fetch command was successfull or not. # -fetched = $pkg_status foo >'foo available 1' -not_fetched = $pkg_status foo >'foo unknown' +fetched = [cmdline] $pkg_status foo >'foo available 1' +not_fetched = [cmdline] $pkg_status foo >'foo unknown' sc = " " # Space character to append to here-document line when required. diff --git a/tests/rep-create.testscript b/tests/rep-create.testscript index 63b7064..bca7305 100644 --- a/tests/rep-create.testscript +++ b/tests/rep-create.testscript @@ -19,7 +19,7 @@ # Make sure the cloned repository has a valid location, so we can use # rep-info command to validate the repository info. # - clone_rep = mkdir 1/ && cp -r $src/stable 1/ + clone_rep = [cmdline] mkdir 1/ && cp -r $src/stable 1/ : without-key : @@ -120,7 +120,7 @@ # Make sure the cloned repository has a valid location, so we can use # rep-info command to validate the repository info. # - clone_rep = mkdir 1/ && cp -r ../stable 1/ + clone_rep = [cmdline] mkdir 1/ && cp -r ../stable 1/ : with-key : @@ -204,7 +204,7 @@ : Test that package manifest that contains an unknown name is properly handled. : { - clone_rep = cp -r $src/testing ./ + clone_rep = [cmdline] cp -r $src/testing ./ : fail : @@ -228,7 +228,7 @@ : Here we break the 'stable' repository prior to running a test. : { - clone_rep = cp -r $src/stable ./ + clone_rep = [cmdline] cp -r $src/stable ./ : no-repositories-manifest : diff --git a/tests/rep-fetch-git-refname.testscript b/tests/rep-fetch-git-refname.testscript index b5de881..e9aa4e9 100644 --- a/tests/rep-fetch-git-refname.testscript +++ b/tests/rep-fetch-git-refname.testscript @@ -39,7 +39,7 @@ : changed : { - g = git -C + g = [cmdline] git -C u = "$rep_git/state1" d = cfg/libfoo-1.0.0 diff --git a/tests/rep-info.testscript b/tests/rep-info.testscript index 992f0e9..8db405d 100644 --- a/tests/rep-info.testscript +++ b/tests/rep-info.testscript @@ -20,7 +20,7 @@ # Prepare repositories used by tests if running in the local mode. # +if! $remote - rc = $rep_create 2>! + rc = [cmdline] $rep_create 2>! # Create the unsigned 'testing' repository. # diff --git a/tests/rep-list.testscript b/tests/rep-list.testscript index 3e9cfb7..50a6501 100644 --- a/tests/rep-list.testscript +++ b/tests/rep-list.testscript @@ -37,7 +37,7 @@ cp -r $src/stable $out/stable cp -r $src/testing $out/testing - c = $rep_create 2>! + c = [cmdline] $rep_create 2>! $c $out/extra &$out/extra/packages.manifest $c $out/math &$out/math/packages.manifest diff --git a/tests/rep-remove.testscript b/tests/rep-remove.testscript index e6f3d91..92a974b 100644 --- a/tests/rep-remove.testscript +++ b/tests/rep-remove.testscript @@ -41,7 +41,7 @@ cp -r $src/testing $out/testing cp -r $src/alpha $out/alpha - c = $rep_create 2>! + c = [cmdline] $rep_create 2>! $c $out/extra &$out/extra/packages.manifest $c $out/math &$out/math/packages.manifest |