forked from facebook/sapling
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mononoke/integration tests: use C locale by default
Summary: As of D22098359 (facebook@7f15881) the default locale used by integration tests is en_US.UTF-8, but as the comment in code mentiones: ``` The en_US.UTF-8 locale doesn't behave the same on all systems and trying to run commands like "sed" or "tr" on non-utf8 data will result in "Illegal byte sequence" error. That is why we are forcing the "C" locale. ``` Additionally I've changed the test-walker-throttle.t test to use "/bin/date" directly. Previously it was using "/usr/bin/date", but the "/bin/date" is a more standard path as it works on MacOS. Differential Revision: D22865007 fbshipit-source-id: 8307c82dcb1cf8f23c1832cf54114aaf5cf18b76
- Loading branch information
1 parent
070b9ab
commit 8d5c815
Showing
8 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -315,6 +315,7 @@ def t(): | |
"slowtimeout": ("HGTEST_SLOWTIMEOUT", 1000), | ||
"port": ("HGTEST_PORT", 20059), | ||
"shell": ("HGTEST_SHELL", "bash"), | ||
"locale": ("HGTEST_LOCALE", "en_US.UTF-8"), | ||
"maxdifflines": ("HGTEST_MAXDIFFLINES", 200), | ||
} | ||
|
||
|
@@ -472,6 +473,9 @@ def getparser(): | |
harness.add_argument( | ||
"--shell", help="shell to use (default: $%s or %s)" % defaults["shell"] | ||
) | ||
harness.add_argument( | ||
"--locale", help="locale to use (default: $%s or %s)" % defaults["locale"] | ||
) | ||
harness.add_argument( | ||
"--showchannels", action="store_true", help="show scheduling channels" | ||
) | ||
|
@@ -1516,7 +1520,7 @@ def defineport(i): | |
|
||
# Reset some environment variables to well-known values so that | ||
# the tests produce repeatable output. | ||
env["LANG"] = env["LC_ALL"] = env["LANGUAGE"] = "en_US.UTF-8" | ||
env["LANG"] = env["LC_ALL"] = env["LANGUAGE"] = self._options.locale | ||
env["TZ"] = "GMT" | ||
env["EMAIL"] = "Foo Bar <[email protected]>" | ||
env["COLUMNS"] = "80" | ||
|