Exemplo n.º 1
0
            public SdkResolutionFixture(SharedTestState state)
            {
                _builtDotnet = Path.Combine(TestArtifact.TestArtifactsPath, "sharedFrameworkPublish");
                Dotnet       = new DotNetCli(_builtDotnet);

                _fixture = state.HostApiInvokerAppFixture.Copy();

                Directory.CreateDirectory(WorkingDir);

                // start with an empty global.json, it will be ignored, but prevent one lying on disk
                // on a given machine from impacting the test.
                File.WriteAllText(GlobalJson, "{}");

                foreach (string sdk in ProgramFilesGlobalSdks)
                {
                    Directory.CreateDirectory(Path.Combine(ProgramFilesGlobalSdkDir, sdk));
                }
                foreach (string sdk in SelfRegisteredGlobalSdks)
                {
                    Directory.CreateDirectory(Path.Combine(SelfRegisteredGlobalSdkDir, sdk));
                }
                foreach (string sdk in LocalSdks)
                {
                    Directory.CreateDirectory(Path.Combine(LocalSdkDir, sdk));
                }
            }
Exemplo n.º 2
0
        public LightupAppActivation(LightupAppActivation.SharedTestState fixture)
        {
            sharedTestState = fixture;

            // From the artifacts dir, it's possible to find where the sharedFrameworkPublish folder is. We need
            // to locate it because we'll copy its contents into other folders
            string artifactsDir = new RepoDirectoriesProvider().GetTestContextVariable("TEST_ARTIFACTS");
            string builtDotnet  = Path.Combine(artifactsDir, "sharedFrameworkPublish");

            // The dotnetLightupSharedFxLookup dir will contain some folders and files that will be necessary to perform the tests
            string sharedLookupDir = Path.Combine(artifactsDir, "dotnetLightupSharedFxLookup");

            _baseDirArtifact = new TestArtifact(SharedFramework.CalculateUniqueTestDirectory(sharedLookupDir));
            _fxBaseDir       = Path.Combine(_baseDirArtifact.Location, "shared", "Microsoft.NETCore.App");
            _uberFxBaseDir   = Path.Combine(_baseDirArtifact.Location, "shared", "Microsoft.UberFramework");

            SharedFramework.CopyDirectory(builtDotnet, _baseDirArtifact.Location);

            var repoDirectories = new RepoDirectoriesProvider(builtDotnet: _baseDirArtifact.Location);

            GlobalLightupClientFixture = new TestProjectFixture("LightupClient", repoDirectories)
                                         .EnsureRestored()
                                         .BuildProject();

            string greatestVersionSharedFxPath = sharedTestState.LightupLibFixture_Built.BuiltDotnet.GreatestVersionSharedFxPath;
            string sharedFxVersion             = (new DirectoryInfo(greatestVersionSharedFxPath)).Name;

            _builtSharedFxDir     = Path.Combine(builtDotnet, "shared", "Microsoft.NETCore.App", sharedFxVersion);
            _builtSharedUberFxDir = Path.Combine(builtDotnet, "shared", "Microsoft.UberFramework", sharedFxVersion);
            SharedFramework.CreateUberFrameworkArtifacts(_builtSharedFxDir, _builtSharedUberFxDir, SystemCollectionsImmutableAssemblyVersion, SystemCollectionsImmutableFileVersion);
        }
Exemplo n.º 3
0
        public SDKLookup(SharedTestState sharedState)
        {
            SharedState = sharedState;

            string exeDotNetPath = SharedFramework.CalculateUniqueTestDirectory(sharedState.BaseDir);

            ExecutableDotNetBuilder = new DotNetBuilder(exeDotNetPath, sharedState.BuiltDotNet.BinPath, "exe");
            ExecutableDotNet        = ExecutableDotNetBuilder
                                      .AddMicrosoftNETCoreAppFrameworkMockHostPolicy("9999.0.0")
                                      .Build();

            // Trace messages used to identify from which folder the SDK was picked
            ExecutableSelectedMessage = $"Using .NET SDK dll=[{Path.Combine(ExecutableDotNet.BinPath, "sdk")}";

            // Note: no need to delete the directory, it will be removed once the entire class is done
            //       since everything is under the BaseDir from the shared state
        }
Exemplo n.º 4
0
            public SdkResolutionFixture(SharedTestState state)
            {
                _fixture = state.PreviouslyPublishedAndRestoredPortableApiTestProjectFixture.Copy();

                Directory.CreateDirectory(WorkingDir);

                // start with an empty global.json, it will be ignored, but prevent one lying on disk
                // on a given machine from impacting the test.
                File.WriteAllText(GlobalJson, "{}");

                foreach (string sdk in GlobalSdks)
                {
                    Directory.CreateDirectory(Path.Combine(GlobalSdkDir, sdk));
                }

                foreach (string sdk in LocalSdks)
                {
                    Directory.CreateDirectory(Path.Combine(LocalSdkDir, sdk));
                }
            }
Exemplo n.º 5
0
 public BundleLegacy(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 6
0
 public ResolveComponentDependencies(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
 public GivenThatICareAboutHostVersionCompatibility(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 8
0
 public IncludedFrameworksSettings(SharedTestState sharedState)
 {
     SharedState = sharedState;
 }
Exemplo n.º 9
0
 public AppHostUsedWithSymbolicLinks(AppHostUsedWithSymbolicLinks.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 10
0
 public HammerServiceTest(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 11
0
 public Comhost(SharedTestState sharedTestState)
 {
     sharedState = sharedTestState;
 }
Exemplo n.º 12
0
 public PortableAppActivation(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 13
0
 public FXVersionCLI(SharedTestState sharedState)
 {
     SharedState = sharedState;
 }
Exemplo n.º 14
0
 public AppPerAssemblyVersionResolution(SharedTestState sharedState)
     : base(sharedState)
 {
 }
Exemplo n.º 15
0
 public Nethost(SharedTestState sharedTestState)
 {
     sharedState = sharedTestState;
 }
Exemplo n.º 16
0
 public PerAssemblyVersionResolutionBase(SharedTestState fixture)
 {
     SharedState = fixture;
 }
Exemplo n.º 17
0
 public ComponentPerAssemblyVersionResolution(SharedTestState sharedState)
     : base(sharedState)
 {
 }
Exemplo n.º 18
0
 public GivenThatICareAboutTracing(GivenThatICareAboutTracing.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 19
0
 public BundleAndExtract(BundleAndExtract.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 20
0
 public HostVersionCompatibility(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
 public RollForwardAndRollForwardOnNoCandidateFxSettings(SharedTestState sharedState)
 {
     SharedState = sharedState;
 }
Exemplo n.º 22
0
 public BundledAppWithSubDirs(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 23
0
 public ResolveComponentDependencies(SharedTestState fixture, ITestOutputHelper output)
 {
     sharedTestState = fixture;
     this.output     = output;
 }
Exemplo n.º 24
0
 public MultiArchInstallLocation(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 25
0
 public RollForwardOnNoCandidateFx(SharedTestState sharedState)
 {
     SharedState = sharedState;
 }
 public GivenThatICareAboutDotnetArgValidationScenarios(GivenThatICareAboutDotnetArgValidationScenarios.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 27
0
 public ClsidMapTests(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 28
0
 public BundleExtractToSpecificPath(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 29
0
 public DotnetArgValidation(DotnetArgValidation.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
Exemplo n.º 30
0
 public StandaloneAppActivation(StandaloneAppActivation.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }