示例#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));
                }
            }
示例#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);
        }
示例#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
        }
示例#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));
                }
            }
示例#5
0
 public BundleLegacy(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#6
0
 public ResolveComponentDependencies(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
 public GivenThatICareAboutHostVersionCompatibility(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#8
0
 public IncludedFrameworksSettings(SharedTestState sharedState)
 {
     SharedState = sharedState;
 }
示例#9
0
 public AppHostUsedWithSymbolicLinks(AppHostUsedWithSymbolicLinks.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#10
0
 public HammerServiceTest(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#11
0
 public Comhost(SharedTestState sharedTestState)
 {
     sharedState = sharedTestState;
 }
示例#12
0
 public PortableAppActivation(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#13
0
 public FXVersionCLI(SharedTestState sharedState)
 {
     SharedState = sharedState;
 }
示例#14
0
 public AppPerAssemblyVersionResolution(SharedTestState sharedState)
     : base(sharedState)
 {
 }
示例#15
0
 public Nethost(SharedTestState sharedTestState)
 {
     sharedState = sharedTestState;
 }
示例#16
0
 public PerAssemblyVersionResolutionBase(SharedTestState fixture)
 {
     SharedState = fixture;
 }
示例#17
0
 public ComponentPerAssemblyVersionResolution(SharedTestState sharedState)
     : base(sharedState)
 {
 }
 public GivenThatICareAboutTracing(GivenThatICareAboutTracing.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#19
0
 public BundleAndExtract(BundleAndExtract.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#20
0
 public HostVersionCompatibility(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
 public RollForwardAndRollForwardOnNoCandidateFxSettings(SharedTestState sharedState)
 {
     SharedState = sharedState;
 }
示例#22
0
 public BundledAppWithSubDirs(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
 public ResolveComponentDependencies(SharedTestState fixture, ITestOutputHelper output)
 {
     sharedTestState = fixture;
     this.output     = output;
 }
示例#24
0
 public MultiArchInstallLocation(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#25
0
 public RollForwardOnNoCandidateFx(SharedTestState sharedState)
 {
     SharedState = sharedState;
 }
 public GivenThatICareAboutDotnetArgValidationScenarios(GivenThatICareAboutDotnetArgValidationScenarios.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#27
0
 public ClsidMapTests(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#28
0
 public BundleExtractToSpecificPath(SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#29
0
 public DotnetArgValidation(DotnetArgValidation.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }
示例#30
0
 public StandaloneAppActivation(StandaloneAppActivation.SharedTestState fixture)
 {
     sharedTestState = fixture;
 }