protected GVFSFunctionalTestEnlistment CreateNewEnlistment(string localCacheRoot = null, string branch = null)
        {
            GVFSFunctionalTestEnlistment output = GVFSFunctionalTestEnlistment.CloneAndMount(GVFSTestConfig.PathToGVFS, branch, localCacheRoot);

            this.enlistmentsToDelete.Add(output);
            return(output);
        }
Example #2
0
 protected void CreateEnlistment(string commitish = null)
 {
     this.Enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(GVFSTestConfig.PathToGVFS, commitish: commitish);
     GitProcess.Invoke(this.Enlistment.RepoRoot, "config advice.statusUoption false");
     this.ControlGitRepo = ControlGitRepo.Create(commitish);
     this.ControlGitRepo.Initialize();
 }
Example #3
0
        protected virtual void CreateEnlistment()
        {
            string pathToGvfs = Path.Combine(TestContext.CurrentContext.TestDirectory, Properties.Settings.Default.PathToGVFS);

            this.Enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(pathToGvfs);
            GitProcess.Invoke(this.Enlistment.RepoRoot, "config advice.statusUoption false");
            this.ControlGitRepo = ControlGitRepo.Create();
            this.ControlGitRepo.Initialize();
        }
Example #4
0
        protected GVFSFunctionalTestEnlistment CreateNewEnlistment(string localCacheRoot = null, string branch = null)
        {
            string pathToGvfs = Path.Combine(TestContext.CurrentContext.TestDirectory, Properties.Settings.Default.PathToGVFS);

            GVFSFunctionalTestEnlistment output = GVFSFunctionalTestEnlistment.CloneAndMount(pathToGvfs, branch, localCacheRoot);

            this.enlistmentsToDelete.Add(output);
            return(output);
        }
Example #5
0
        protected GVFSFunctionalTestEnlistment CreateNewEnlistment(string objectCachePath = null, string branch = null)
        {
            string pathToGvfs = Path.Combine(TestContext.CurrentContext.TestDirectory, Properties.Settings.Default.PathToGVFS);

            // TODO 1081003: Re-enable shared cache - use objectCachePath argument
            GVFSFunctionalTestEnlistment output = GVFSFunctionalTestEnlistment.CloneAndMount(pathToGvfs, branch);

            this.enlistmentsToDelete.Add(output);
            return(output);
        }
 public virtual void CreateEnlistment()
 {
     if (this.forcePerRepoObjectCache)
     {
         this.Enlistment = GVFSFunctionalTestEnlistment.CloneAndMountWithPerRepoCache(GVFSTestConfig.PathToGVFS, this.skipPrefetchDuringClone);
     }
     else
     {
         this.Enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(GVFSTestConfig.PathToGVFS);
     }
 }
Example #7
0
        public virtual void CreateEnlistment()
        {
            string pathToGvfs = Path.Combine(TestContext.CurrentContext.TestDirectory, Properties.Settings.Default.PathToGVFS);

            if (this.forcePerRepoObjectCache)
            {
                this.Enlistment = GVFSFunctionalTestEnlistment.CloneAndMountWithPerRepoCache(pathToGvfs);
            }
            else
            {
                this.Enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(pathToGvfs);
            }
        }
        public void CloneCreatesCorrectFilesInRoot()
        {
            GVFSFunctionalTestEnlistment enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(GVFSTestConfig.PathToGVFS);

            try
            {
                string[] files = Directory.GetFiles(enlistment.EnlistmentRoot);
                files.Length.ShouldEqual(1);
                files.ShouldContain(x => Path.GetFileName(x).Equals("git.cmd", StringComparison.Ordinal));
                string[] directories = Directory.GetDirectories(enlistment.EnlistmentRoot);
                directories.Length.ShouldEqual(2);
                directories.ShouldContain(x => Path.GetFileName(x).Equals(".gvfs", StringComparison.Ordinal));
                directories.ShouldContain(x => Path.GetFileName(x).Equals("src", StringComparison.Ordinal));
            }
            finally
            {
                enlistment.UnmountAndDeleteAll();
            }
        }
Example #9
0
        private void Clone(bool useGvfs, string commitish = null)
        {
            const string PathVarName = "Path";

            if (useGvfs)
            {
                // make sure PATH points to PathToGVFS beause otherwise GVFS.hooks.exe won't be found when executing gvfs.exe
                Assert.True(CurrentProcess.IsElevated, "Tests must run elevated!!");
                string currentPathValue = Environment.GetEnvironmentVariable(PathVarName) ?? "";
                var    newPathValue     = Path.GetDirectoryName(Settings.Default.PathToGVFS) + ";" + currentPathValue;
                Environment.SetEnvironmentVariable(PathVarName, newPathValue);

                m_enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(Settings.Default.PathToGVFS, skipPrefetch: true);
            }
            else
            {
                var repoName            = Path.GetFileName(RepoRoot);
                var repoParentDirectory = Path.GetDirectoryName(RepoRoot);
                Git($"clone {m_repo} {repoName}", workingDirectory: repoParentDirectory);
            }
        }
        public virtual void CreateEnlistment()
        {
            string pathToGvfs = Path.Combine(TestContext.CurrentContext.TestDirectory, Properties.Settings.Default.PathToGVFS);

            this.Enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(pathToGvfs);
        }
 public virtual void CreateEnlistment()
 {
     this.Enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(GVFSTestConfig.PathToGVFS);
 }