@@ -46,51 +46,48 @@ public static RunTestsOptions Parse(string[] args)
46
46
description : "The version of the EF tool to use" )
47
47
{ Argument = new Argument < string > ( ) , Required = true } ,
48
48
49
- new Option (
50
- aliases : new string [ ] { "--aspnetruntime" } ,
51
- description : "The path to the aspnet runtime nupkg to install" )
52
- { Argument = new Argument < string > ( ) , Required = true } ,
53
-
54
- new Option (
55
- aliases : new string [ ] { "--aspnetref" } ,
56
- description : "The path to the aspnet ref nupkg to install" )
57
- { Argument = new Argument < string > ( ) , Required = true } ,
58
-
59
49
new Option (
60
50
aliases : new string [ ] { "--helixTimeout" } ,
61
51
description : "The timeout duration of the Helix job" )
62
52
{ Argument = new Argument < string > ( ) , Required = true } ,
63
53
} ;
64
54
65
55
var parseResult = command . Parse ( args ) ;
66
- var options = new RunTestsOptions ( ) ;
67
- options . Target = parseResult . ValueForOption < string > ( "--target" ) ;
68
- options . RuntimeVersion = parseResult . ValueForOption < string > ( "--runtime" ) ;
69
- options . HelixQueue = parseResult . ValueForOption < string > ( "--queue" ) ;
70
- options . Architecture = parseResult . ValueForOption < string > ( "--arch" ) ;
71
- options . Quarantined = parseResult . ValueForOption < bool > ( "--quarantined" ) ;
72
- options . EfVersion = parseResult . ValueForOption < string > ( "--ef" ) ;
73
- options . AspNetRuntime = parseResult . ValueForOption < string > ( "--aspnetruntime" ) ;
74
- options . AspNetRef = parseResult . ValueForOption < string > ( "--aspnetref" ) ;
75
- options . Timeout = TimeSpan . Parse ( parseResult . ValueForOption < string > ( "--helixTimeout" ) ) ;
76
- options . HELIX_WORKITEM_ROOT = Environment . GetEnvironmentVariable ( "HELIX_WORKITEM_ROOT" ) ;
77
- options . Path = Environment . GetEnvironmentVariable ( "PATH" ) ;
78
- options . DotnetRoot = Environment . GetEnvironmentVariable ( "DOTNET_ROOT" ) ;
56
+ var sharedFxVersion = parseResult . ValueForOption < string > ( "--runtime" ) ;
57
+ var options = new RunTestsOptions
58
+ {
59
+ Architecture = parseResult . ValueForOption < string > ( "--arch" ) ,
60
+ EfVersion = parseResult . ValueForOption < string > ( "--ef" ) ,
61
+ HelixQueue = parseResult . ValueForOption < string > ( "--queue" ) ,
62
+ Quarantined = parseResult . ValueForOption < bool > ( "--quarantined" ) ,
63
+ RuntimeVersion = sharedFxVersion ,
64
+ Target = parseResult . ValueForOption < string > ( "--target" ) ,
65
+ Timeout = TimeSpan . Parse ( parseResult . ValueForOption < string > ( "--helixTimeout" ) ) ,
66
+
67
+ // When targeting pack builds, it has exactly the same version as the shared framework.
68
+ AspNetRef = $ "Microsoft.AspNetCore.App.Ref.{ sharedFxVersion } .nupkg",
69
+ AspNetRuntime = $ "Microsoft.AspNetCore.App.Runtime.win-x64.{ sharedFxVersion } .nupkg",
70
+
71
+ DotnetRoot = Environment . GetEnvironmentVariable ( "DOTNET_ROOT" ) ,
72
+ HELIX_WORKITEM_ROOT = Environment . GetEnvironmentVariable ( "HELIX_WORKITEM_ROOT" ) ,
73
+ Path = Environment . GetEnvironmentVariable ( "PATH" ) ,
74
+ } ;
75
+
79
76
return options ;
80
77
}
81
78
82
- public string Target { get ; set ; }
83
- public string SdkVersion { get ; set ; }
84
- public string RuntimeVersion { get ; set ; }
85
- public string AspNetRuntime { get ; set ; }
86
- public string AspNetRef { get ; set ; }
87
- public string HelixQueue { get ; set ; }
88
- public string Architecture { get ; set ; }
89
- public bool Quarantined { get ; set ; }
90
- public string EfVersion { get ; set ; }
91
- public string HELIX_WORKITEM_ROOT { get ; set ; }
92
- public string DotnetRoot { get ; set ; }
79
+ public string Architecture { get ; private set ; }
80
+ public string EfVersion { get ; private set ; }
81
+ public string HelixQueue { get ; private set ; }
82
+ public bool Quarantined { get ; private set ; }
83
+ public string RuntimeVersion { get ; private set ; }
84
+ public string Target { get ; private set ; }
85
+ public TimeSpan Timeout { get ; private set ; }
86
+
87
+ public string AspNetRef { get ; private set ; }
88
+ public string AspNetRuntime { get ; private set ; }
89
+ public string HELIX_WORKITEM_ROOT { get ; private set ; }
90
+ public string DotnetRoot { get ; private set ; }
93
91
public string Path { get ; set ; }
94
- public TimeSpan Timeout { get ; set ; }
95
92
}
96
93
}
0 commit comments