[Groonga-commit] groonga/groonga at f2cb933 [master] appveyor: enable testing with japanese directory (#932)

Back to archive index
Kentaro Hayashi null+****@clear*****
Thu Apr 18 11:41:59 JST 2019


Kentaro Hayashi	2019-04-18 11:41:59 +0900 (Thu, 18 Apr 2019)

  Revision: f2cb9337f3c05df5e349da79efcb1c96e8902bbc
  https://github.com/groonga/groonga/commit/f2cb9337f3c05df5e349da79efcb1c96e8902bbc

  Message:
    appveyor: enable testing with japanese directory (#932)
    
    * appveyor: enable testing with japanese directory
    
    On Appveyor, インストール directory is recognized unicode escape
    sequence. so it should be unescaped correctly.
    
    * appveyor: define escaped sub folder name
    
    It also need comment to explain why escaped literal is needed.

  Modified files:
    appveyor.yml
    test/command_line/run-test.rb

  Modified: appveyor.yml (+5 -3)
===================================================================
--- appveyor.yml    2019-04-17 21:33:26 +0900 (58e11095b)
+++ appveyor.yml    2019-04-18 11:41:59 +0900 (5cc93deaf)
@@ -53,8 +53,8 @@ install:
   # - choco install -y imdisk-toolkit
   # - mkdir tmp
   # - imdisk -a -t file -m tmp -o awe -s 1G -p "/fs:ntfs /q /y"
-  # - set GROONGA_INSTALL_SUB_FOLDER=インストール
-  - set GROONGA_INSTALL_SUB_FOLDER=install
+  - set GROONGA_INSTALL_SUB_FOLDER=インストール
+  #- set GROONGA_INSTALL_SUB_FOLDER=install
   - ps: |
       $Env:GROONGA_VERSION = (Get-Content base_version)
       if ($Env:APPVEYOR_REPO_TAG -eq "false") {
@@ -121,8 +121,10 @@ test_script:
      --timeout 60
      --n-retries 2
      test\command\suite
+  # On Appveyor, インストール directory is recognized unicode escape sequence.
+  - set GROONGA_INSTALL_SUB_FOLDER_ESCAPED=\u7E67\uFF64\u7E5D\uFF73\u7E67\uFF79\u7E5D\u533B\u30FB\u7E5D\uFF6B
   - ruby test\command_line\run-test.rb
-     --groonga-install-prefix=%FULL_GROONGA_INSTALL_FOLDER%
+     --groonga-install-prefix=%APPVEYOR_BUILD_FOLDER%\\%GROONGA_INSTALL_SUB_FOLDER_ESCAPED%\\%GROONGA_INSTALL_FOLDER%
 
 on_success:
   - cd %GROONGA_INSTALL_SUB_FOLDER%

  Modified: test/command_line/run-test.rb (+2 -0)
===================================================================
--- test/command_line/run-test.rb    2019-04-17 21:33:26 +0900 (c425c73d0)
+++ test/command_line/run-test.rb    2019-04-18 11:41:59 +0900 (5418a4024)
@@ -21,8 +21,10 @@ if (ARGV[0] || "").start_with?("--groonga-install-prefix=")
 end
 
 if groonga_install_prefix
+  unescaped_prefix = groonga_install_prefix.gsub(/\\u([\da-fA-F]{4})/) { [$1].pack('H*').unpack('n*').pack("U*")}
   ENV["PATH"] = [
     [groonga_install_prefix, "bin"].join(File::ALT_SEPARATOR || File::SEPARATOR),
+    [unescaped_prefix, "bin"].join(File::ALT_SEPARATOR || File::SEPARATOR),
     ENV["PATH"],
   ].join(File::PATH_SEPARATOR)
 else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190418/6fd47002/attachment-0001.html>


More information about the Groonga-commit mailing list
Back to archive index