如何设置本地测试/构建机器?

时间:2021-05-13 02:49:17

I am about to start a new personal project. It aims to be a pretty big one so I thought it would be a good idea to keep some sort of CVS. I have also read lot of interesting stuff about unit testing and I would like to include some system that automatically builds the project and runs a series of test after each check in. The characteristics are:

我即将开始一个新的个人项目。它的目标是相当大,所以我认为保留某种CVS是个好主意。我还阅读了很多关于单元测试的有趣内容,我想包括一些自动构建项目的系统,并在每次检查后运行一系列测试。其特点是:

  • Only one developer and one machine (just me and my computer!).
  • 只有一个开发人员和一台机器(只有我和我的电脑!)。

  • Include a CVS.
  • 包括CVS。

  • Include automated testing.
  • 包括自动化测试。

  • The software should be free (as in no-cost) and run under Linux.
  • 该软件应该是免费的(如免费)并在Linux下运行。

  • It is going to be C++ and ANTLR based.
  • 它将基于C ++和ANTLR。

So far, I have set up SVN and Eclipse+CDT+ANTLR for development but I am pretty lost about the automated build+test setting. To write the tests I have been thinking in Boost.Test or UnitTest++.

到目前为止,我已经为开发设置了SVN和Eclipse + CDT + ANTLR,但我对自动构建+测试设置感到很遗憾。编写我一直在Boost.Test或UnitTest ++中考虑的测试。

So that's the source of my question. How should I set up my local test/build machine? Links to valuable tutorials are more than welcome.

这就是我的问题的根源。我应该如何设置我的本地测试/构建机器?有价值的教程链接非常受欢迎。

Thanks.

2 个解决方案

#1


It seems that most open source continuous integration servers are built on java and does not support C++ "out-of-the-box". However there are some links you can start with (note that for running most open source continuous integration servers you need a java environment):

似乎大多数开源持续集成服务器都是基于java构建的,并且不支持C ++“开箱即用”。但是,您可以从一些链接开始(请注意,对于运行大多数开源持续集成服务器,您需要一个Java环境):

I personally prefer Hudson because of its simply install (no need for application server just start with java -jar hudson.war) and easy to use and quite "clever" gui. Hudson can checkout your code from SVN (or CVS) and can run a shell script or Ant file as a build script. Maybe you have to spend a few days to set up a configuration with a proper build script but I think it worth the time.

我个人更喜欢Hudson因为它的简单安装(不需要应用程序服务器只是从java -jar hudson.war开始)而且易于使用且非常“聪明”的gui。 Hudson可以从SVN(或CVS)检出您的代码,并可以将shell脚本或Ant文件作为构建脚本运行。也许您需要花几天时间来设置具有正确构建脚本的配置,但我认为值得花时间。

#2


The sort of automatic process you are looking at is called continuous integration. There is software to help you with this - a good example is JetBrains TeamCity. You will also hear of people using CruiseControl, Atlassian Bamboo and so on for this.

您正在查看的那种自动过程称为持续集成。有软件可以帮助你解决这个问题 - JetBrains TeamCity就是一个很好的例子。您还将听到有人使用CruiseControl,Atlassian Bamboo等。

To take full advantage of this, you may also want to look at an automated build tool like Ant or Mavenl; your continuous integration build will then use this as its build runner.

要充分利用这一点,您可能还需要查看像Ant或Mavenl这样的自动构建工具;然后,您的持续集成构建将使用它作为构建运行器。

A good starting point would be the Martin Fowler page on CI or the Wikipedia one.

一个很好的起点是关于CI或*的Martin Fowler页面。

#1


It seems that most open source continuous integration servers are built on java and does not support C++ "out-of-the-box". However there are some links you can start with (note that for running most open source continuous integration servers you need a java environment):

似乎大多数开源持续集成服务器都是基于java构建的,并且不支持C ++“开箱即用”。但是,您可以从一些链接开始(请注意,对于运行大多数开源持续集成服务器,您需要一个Java环境):

I personally prefer Hudson because of its simply install (no need for application server just start with java -jar hudson.war) and easy to use and quite "clever" gui. Hudson can checkout your code from SVN (or CVS) and can run a shell script or Ant file as a build script. Maybe you have to spend a few days to set up a configuration with a proper build script but I think it worth the time.

我个人更喜欢Hudson因为它的简单安装(不需要应用程序服务器只是从java -jar hudson.war开始)而且易于使用且非常“聪明”的gui。 Hudson可以从SVN(或CVS)检出您的代码,并可以将shell脚本或Ant文件作为构建脚本运行。也许您需要花几天时间来设置具有正确构建脚本的配置,但我认为值得花时间。

#2


The sort of automatic process you are looking at is called continuous integration. There is software to help you with this - a good example is JetBrains TeamCity. You will also hear of people using CruiseControl, Atlassian Bamboo and so on for this.

您正在查看的那种自动过程称为持续集成。有软件可以帮助你解决这个问题 - JetBrains TeamCity就是一个很好的例子。您还将听到有人使用CruiseControl,Atlassian Bamboo等。

To take full advantage of this, you may also want to look at an automated build tool like Ant or Mavenl; your continuous integration build will then use this as its build runner.

要充分利用这一点,您可能还需要查看像Ant或Mavenl这样的自动构建工具;然后,您的持续集成构建将使用它作为构建运行器。

A good starting point would be the Martin Fowler page on CI or the Wikipedia one.

一个很好的起点是关于CI或*的Martin Fowler页面。