diff options
Diffstat (limited to 'tests/remote-git.testscript')
-rw-r--r-- | tests/remote-git.testscript | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/tests/remote-git.testscript b/tests/remote-git.testscript index 6c539b6..377277d 100644 --- a/tests/remote-git.testscript +++ b/tests/remote-git.testscript @@ -1,5 +1,4 @@ # file : tests/remote-git.testscript -# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file # Tests for commands that accept git repository location must be able to run @@ -37,11 +36,7 @@ git_supported = ($git_version_major > 2 || \ # out_git = $canonicalize([dir_path] $~/git/$cmd) -# If $remote is true then remote repository locations must be used for tests. -# -remote = $config.bpkg.test.remote - -+if ($remote != true) ++if! $remote rep_git_local = ($cxx.target.class != 'windows' \ ? "file://$out_git" \ : "file:/$regex.replace($out_git, '\\', '/')") @@ -52,12 +47,6 @@ remote = $config.bpkg.test.remote mkdir -p $out_git else - # If $git_ssh is not true then testscripts must skip tests that use the ssh - # protocol. Otherwise, it is assumed that the password-less ssh - # authentication is arranged for git.build2.org. - # - git_ssh = $config.bpkg.test.git.ssh - rep_git_https_dumb = "https://build2.org/bpkg/git/$cmd" rep_git_https_smart = "https://git.build2.org/testing/bpkg/advonly/$cmd" rep_git_https_smart_unadv = "https://git.build2.org/testing/bpkg/unadv/$cmd" @@ -77,12 +66,17 @@ else end # Command for extracting the git repository from a tarball into the output -# directory (see above). +# directory (see above). Note: should only be used for .tar, not .tar.gz. # # Note that we can expect that the tar program is present on the platform. We # will use the same options as we do for unpacking of package archives (see # pkg-unpack.cxx). # -git_extract = ($cxx.target.class != 'windows' \ +# Note that on Windows we still use tar rather than bsdtar here, since the +# later fails for dangling symlinks and we have such symlinks in the +# repository archives which are used for testing. +# +git_extract = [cmdline] \ + ($cxx.target.class != 'windows' \ ? tar -C $out_git -xf \ : tar -C $regex.replace($out_git, '\\', '/') --force-local -xf) |