mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
mononoke/integration tests: use LC_ALL=C locale
Summary: On MacOS the default localisation configuration (UTF-8) won't allow operations on arbitrary bytes of data via some commands, because not all sequences of bytes are valid utf-8 characters. That is why when handling arbitrary bytes it is better to use the "C" locale, which can be achieved by setting the LC_ALL env variable to "C". Reviewed By: krallin Differential Revision: D22762189 fbshipit-source-id: aa917886c79fba5ea61ff7168767fc4b052a35a1
This commit is contained in:
parent
16182e626b
commit
ec9be535eb
@ -73,7 +73,6 @@ else:
|
||||
excluded_tests = {
|
||||
"test-backsync-forever.t", # Unknown issue
|
||||
"test-backsyncer-merges.t", # Missing BACKSYNCER
|
||||
"test-blobimport-inline.t", # Illegal byte sequence and "sed -i"
|
||||
"test-blobimport-lfs.t", # Timed out
|
||||
"test-blobimport.t", # Case insensitivity of paths in MacOS
|
||||
"test-blobstore_healer.t", # PANIC not implemented in sql_ext
|
||||
@ -92,7 +91,6 @@ else:
|
||||
"test-gitimport.t", # Issue with hggit extension
|
||||
"test-hook-tailer.t", # Issue with hggit extension
|
||||
"test-hooks.t", # Hooks are not in OSS yet
|
||||
"test-inconsistent-hash.t", # Illegal byte sequence and "sed -i"
|
||||
"test-infinitepush-lfs.t", # Timed out
|
||||
"test-large-path-and-content.t", # Complex bash issues
|
||||
"test-lfs-copytracing.t", # Timed out
|
||||
|
@ -29,7 +29,7 @@
|
||||
$ for (( i=0; i < $lines_cnt; i++ ))
|
||||
> do
|
||||
> LINE_LENGTH=$(random_int $max_line_length)
|
||||
> echo $(head -c 10000 /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $LINE_LENGTH 2>/dev/null | head -n 1) >> file
|
||||
> echo $(head -c 10000 /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w $LINE_LENGTH 2>/dev/null | head -n 1) >> file
|
||||
> done
|
||||
|
||||
$ hg ci -Aqm "commit"$c
|
||||
@ -41,7 +41,7 @@
|
||||
> do
|
||||
> LINE_LENGTH=$(random_int $max_line_length)
|
||||
> LINE_NUMBER=$(random_int $lines_cnt)
|
||||
> CONTENT=$(head -c 10000 /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $LINE_LENGTH 2>/dev/null | head -n 1)
|
||||
> CONTENT=$(head -c 10000 /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w $LINE_LENGTH 2>/dev/null | head -n 1)
|
||||
> sed -i "$LINE_NUMBER""s/.*/$CONTENT/" file
|
||||
> done
|
||||
> hg ci -Aqm "commit"$c
|
||||
|
@ -53,7 +53,7 @@
|
||||
$ PACK_TO_CORRUPT=".hg/store/packs/dee3d9750ad87ede865d69e20330c34e51ec83d5.datapack"
|
||||
# change access to file, as it is readonly
|
||||
$ chmod 666 "$PACK_TO_CORRUPT"
|
||||
$ sed -i s/hello_world/aaaaaaaaaaa/ "$PACK_TO_CORRUPT"
|
||||
$ LC_ALL=C sed -i s/hello_world/aaaaaaaaaaa/ "$PACK_TO_CORRUPT"
|
||||
|
||||
Do a push, but disable cache verification on the client side, otherwise
|
||||
filenode won't be send at all
|
||||
|
Loading…
Reference in New Issue
Block a user