浏览代码

Merge pull request #248 from tamird/test-on-osx

CI: OS X + faster builds
Feng Xiao 10 年之前
父节点
当前提交
d8866ed535
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 5 1
      .travis.yml
  2. 1 1
      src/google/protobuf/compiler/command_line_interface_unittest.cc

+ 5 - 1
.travis.yml

@@ -1,4 +1,8 @@
+sudo: false
 language: cpp
-script: ./autogen.sh && ./configure && make distcheck
+os:
+  - linux
+  - osx
+script: ./autogen.sh && ./configure && make distcheck -j2
 notifications:
   email: false

+ 1 - 1
src/google/protobuf/compiler/command_line_interface_unittest.cc

@@ -991,7 +991,7 @@ TEST_F(CommandLineInterfaceTest, WriteDependencyManifestFile) {
     "  optional Foo foo = 1;\n"
     "}\n");
 
-  string current_working_directory = get_current_dir_name();
+  string current_working_directory = getcwd(NULL, 0);
   SwitchToTempDirectory();
 
   Run("protocol_compiler --dependency_out=manifest --test_out=. "