Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
deps: update ChakraCore to chakra-core/ChakraCore@d6bb4cebb1
Browse files Browse the repository at this point in the history
[1.10>1.11] [MERGE #5758 @sethbrenith] Use different machine pool for OSX CI builds

Merge pull request #5758 from sethbrenith:user/sethb/osx-ci

This is the combination of several changes that have already gone into release/1.10-ci. It updates our CI configuration to build on a different set of Macs, and fixes unit tests that fail with the version of ICU installed on those machines.

Reviewed-By: chakrabot <[email protected]>
  • Loading branch information
sethbrenith authored and boingoing committed Nov 15, 2018
1 parent 7452494 commit 89902eb
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 37 deletions.
15 changes: 10 additions & 5 deletions deps/chakrashim/core/netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def machineTypeToOSTagMap = [
'Windows_NT': 'Windows 8.1', // 'latest-or-auto' -> Windows Server 2012 R2 ~= Windows 8.1 aka Blue
'windows.10.amd64.clientrs4.devex.open': 'Windows 10', // = Windows 10 RS4 with Dev 15.7
'Ubuntu16.04': 'Ubuntu',
'OSX10.12': 'OSX'
'OSX.1011.Amd64.Chakra.Open': 'OSX'
]

def defaultMachineTag = 'latest-or-auto'
Expand Down Expand Up @@ -141,11 +141,12 @@ def CreateXPlatBuildTask = { isPR, buildType, staticBuild, machine, platform, co
def buildFlag = buildType == "release" ? "" : (buildType == "debug" ? "--debug" : "--test-build")
def staticFlag = staticBuild ? "--static" : ""
def swbCheckFlag = (platform == "linux" && buildType == "debug" && !staticBuild) ? "--wb-check" : "";
def icuFlag = (platform == "osx" ? "--icu=/usr/local/opt/icu4c/include" : "")
def icuFlag = (platform == "osx" ? "--icu=/Users/DDITLABS/homebrew/opt/icu4c/include" : "")
def compilerPaths = (platform == "osx") ? "" : "--cxx=/usr/bin/clang++-3.9 --cc=/usr/bin/clang-3.9"
def buildScript = "bash ./build.sh ${staticFlag} -j=`${numConcurrentCommand}` ${buildFlag} " +
"${swbCheckFlag} ${compilerPaths} ${icuFlag} ${customOption} ${extraBuildParams}"
def testScript = "bash test/runtests.sh \"${testVariant}\""
def icuLibFlag = (platform == "osx" ? "--iculib=/Users/DDITLABS/homebrew/opt/icu4c" : "")
def testScript = "bash test/runtests.sh ${icuLibFlag} \"${testVariant}\""

def newJob = job(jobName) {
steps {
Expand All @@ -161,7 +162,11 @@ def CreateXPlatBuildTask = { isPR, buildType, staticBuild, machine, platform, co
true, // doNotFailIfNothingArchived=false ~= failIfNothingArchived (true ~= doNotFail)
false) // archiveOnlyIfSuccessful=false ~= archiveAlways

Utilities.setMachineAffinity(newJob, machine, defaultMachineTag)
if (platform == "osx") {
Utilities.setMachineAffinity(newJob, machine) // OSX machine string contains all info already
} else {
Utilities.setMachineAffinity(newJob, machine, defaultMachineTag)
}
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")

if (nonDefaultTaskSetup == null) {
Expand Down Expand Up @@ -389,7 +394,7 @@ if (isXPlatCompatibleBranch) {
// ---------------

if (isXPlatCompatibleBranch) {
def osString = 'OSX10.12'
def osString = 'OSX.1011.Amd64.Chakra.Open'

// PR and CI checks
CreateXPlatBuildTasks(osString, "osx", "osx", branch, null, "")
Expand Down
13 changes: 11 additions & 2 deletions deps/chakrashim/core/test/Intl/NumberFormat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");

let suppressFormatEqualityCheck = false;

function format() {
let locale = "en-US", options, n;
assert.isTrue(arguments.length > 0);
Expand All @@ -22,7 +24,7 @@ function format() {
const localeString = n.toLocaleString(locale, options);

assert.isTrue(format === localeString, `[locale = ${JSON.stringify(locale)}, options = ${JSON.stringify(options)}] format does not match toLocaleString`);
if (WScript.Platform.INTL_LIBRARY === "icu") {
if (WScript.Platform.INTL_LIBRARY === "icu" && !suppressFormatEqualityCheck) {
assert.isTrue(format === nf.formatToParts(n).map((part) => part.value).join(""), `[locale = ${JSON.stringify(locale)}, options = ${JSON.stringify(options)}] format does not match formatToParts`);
}

Expand Down Expand Up @@ -141,7 +143,12 @@ const tests = [
assert.areEqual("$1.50", formatCurrency({ currencyDisplay: "symbol" }, 1.504), "Currency display: symbol");
assert.areEqual("$1.51", formatCurrency({ currencyDisplay: "symbol" }, 1.505), "Currency display: symbol");
// ICU has a proper "name" currency display, while WinGlob falls back to "code"
if (WScript.Platform.ICU_VERSION === 62) {
// In ICU 62, there is a mismatch between "1.00 US dollar" and "1.00 US dollars"
suppressFormatEqualityCheck = true;
}
assert.matches(/(?:USD[\x20\u00a0]?1.00|1.00 US dollars)/, formatCurrency({ currencyDisplay: "name" }, 1), "Currency display: name");
suppressFormatEqualityCheck = false;
assert.matches(/(?:USD[\x20\u00a0]?1.50|1.50 US dollars)/, formatCurrency({ currencyDisplay: "name" }, 1.504), "Currency display: name");
assert.matches(/(?:USD[\x20\u00a0]?1.51|1.51 US dollars)/, formatCurrency({ currencyDisplay: "name" }, 1.505), "Currency display: name");
}
Expand Down Expand Up @@ -217,7 +224,9 @@ const tests = [
{ type: "group", value: "," },
{ type: "integer", value: "000" }
]);
assertParts("en-US", undefined, NaN, [{ type: "nan", value: "NaN" }]);
if (WScript.Platform.ICU_VERSION !== 62) {
assertParts("en-US", undefined, NaN, [{ type: "nan", value: "NaN" }]);
}
assertParts("en-US", undefined, Infinity, [{ type: "infinity", value: "∞" }]);
assertParts("en-US", undefined, 1000.3423, [
{ type: "integer", value: "1" },
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions deps/chakrashim/core/test/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,11 @@ def _should_test(self, test):

# print output from multi-process run, to be sent with result message
def _print(self, line):
self._print_lines.append(str(line))
self._print_lines.append(line)

# queue a test result from multi-process runs
def _log_result(self, test, fail):
output = '\n'.join(self._print_lines) # collect buffered _print output
output = u'\n'.join(self._print_lines).encode('utf-8') # collect buffered _print output
self._print_lines = []
self.msg_queue.put((test.filename, fail, test.elapsed_time, output))

Expand Down
17 changes: 16 additions & 1 deletion deps/chakrashim/core/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,22 @@ popd > /dev/null
build_type=
binary_path=
release_build=0
test_variant=$1

while [[ $# -gt 0 ]]; do
case "$1" in
--iculib=*)
ICU4C_LIBRARY_PATH=$1
ICU4C_LIBRARY_PATH="${ICU4C_LIBRARY_PATH:9}"
export ICU4C_LIBRARY_PATH
;;

*)
test_variant=$1
;;
esac

shift
done

if [[ -f "$test_path/../out/Debug/ch" ]]; then
echo "Warning: Debug build was found"
Expand Down

0 comments on commit 89902eb

Please sign in to comment.