if (enableCorefxTesting) {
def workspaceRelativeFxRoot = "_/fx"
def absoluteFxRoot = "%WORKSPACE%\\_\\fx"
+
buildCommands += "python %WORKSPACE%\\tests\\scripts\\run-corefx-tests.py -arch ${arch} -build_type ${configuration} -fx_root ${absoluteFxRoot} -fx_branch ${branch} -env_script ${stepScriptLocation}"
setTestJobTimeOut(newJob, scenario)
// Build and text corefx
def workspaceRelativeFxRoot = "_/fx"
def absoluteFxRoot = "\$WORKSPACE/${workspaceRelativeFxRoot}"
+
buildCommands += "python \$WORKSPACE/tests/scripts/run-corefx-tests.py -arch ${arch} -build_type ${configuration} -fx_root ${absoluteFxRoot} -fx_branch ${branch} -env_script ${scriptFileName}"
setTestJobTimeOut(newJob, scenario)
copyArtifacts("${corefxFolder}/linuxarmemulator_softfp_cross_${lowerConfiguration}") {
includePatterns('bin/build.tar.gz')
buildSelector {
- latestSuccessful(true)
+ latestSaved()
}
}
}
// Get corefx
shell("git clone https://github.com/dotnet/corefx fx")
+ // CoreFX is changing their output format and scripts, pick a stable version until all that work has landed.
+ shell("git -C ./fx checkout 551fe49174378adcbf785c0ab12fc69355cef6e8")
+
// Build Linux corefx
shell("./fx/build-native.sh -release -buildArch=x64 -os=Linux")
shell("./fx/build-managed.sh -release -buildArch=x64 -osgroup=Linux -skiptests")
copyArtifacts("${corefxFolder}/${osJobName}_release") {
includePatterns('bin/build.tar.gz')
buildSelector {
- latestSuccessful(true)
+ latestSaved()
}
}
parser.add_argument('-clr_root', dest='clr_root', default=None)
parser.add_argument('-fx_root', dest='fx_root', default=None)
parser.add_argument('-fx_branch', dest='fx_branch', default='master')
+parser.add_argument('-fx_commit', dest='fx_commit', default=None)
parser.add_argument('-env_script', dest='env_script', default=None)
Args:
args (argparser.ArgumentParser): Args parsed by the argument parser.
Returns:
- (arch, build_type, clr_root, fx_root, fx_branch, env_script)
- (str, str, str, str, str, str)
+ (arch, build_type, clr_root, fx_root, fx_branch, fx_commit, env_script)
+ (str, str, str, str, str, str, str)
Notes:
If the arguments are valid then return them all in a tuple. If not, raise
an exception stating x argument is incorrect.
clr_root = args.clr_root
fx_root = args.fx_root
fx_branch = args.fx_branch
+ fx_commit = args.fx_commit
env_script = args.env_script
def validate_arg(arg, check):
validate_arg(build_type, lambda item: item in valid_build_types)
validate_arg(fx_branch, lambda item: True)
+ if fx_commit is None:
+ fx_commit = '551fe49174378adcbf785c0ab12fc69355cef6e8' if fx_branch == 'master' else 'HEAD'
+
if clr_root is None:
clr_root = nth_dirname(os.path.abspath(sys.argv[0]), 3)
else:
validate_arg(env_script, lambda item: os.path.isfile(env_script))
env_script = os.path.abspath(env_script)
- args = (arch, build_type, clr_root, fx_root, fx_branch, env_script)
+ args = (arch, build_type, clr_root, fx_root, fx_branch, fx_commit, env_script)
log('Configuration:')
log(' arch: %s' % arch)
log(' clr_root: %s' % clr_root)
log(' fx_root: %s' % fx_root)
log(' fx_branch: %s' % fx_branch)
+ log(' fx_commit: %s' % fx_commit)
log(' env_script: %s' % env_script)
return args
global Corefx_url
global Unix_name_map
- arch, build_type, clr_root, fx_root, fx_branch, env_script = validate_args(
+ arch, build_type, clr_root, fx_root, fx_branch, fx_commit, env_script = validate_args(
args)
clr_os = 'Windows_NT' if Is_windows else Unix_name_map[os.uname()[0]]
if returncode != 0:
sys.exit(returncode)
+
+ command = "git -C %s checkout %s" % (
+ fx_root, fx_commit)
+
+ log(command)
+
+ if testing:
+ returncode = 0
+ else:
+ returncode = os.system(command)
+
+ if returncode != 0:
+ sys.exit(returncode)
+
cwd = os.getcwd()
log('cd ' + fx_root)
os.chdir(fx_root)