Further use of the TRAVIS-CI

Source: Internet
Author: User

Today, we have a closer look at. travis.yml Files and Makefile:

1. Added a statement in the. travis.yml file to the Linux system with the Cppunit library installed, allowing the code to continuously integrate the written unit tests. The main statements are as follows:

Before_install:

- sudo apt-get install-y libcppunit-dev

The 2.makefile file is as follows (Code main reference: Https://github.com/RTCSD15/test1/blob/master/Makefile)

1PROJ = test- Point2SRCs =Point.cpp test_point.cpp testmain.cpp3HDRs =Point.h test_point.h4 5CC =GCC6OBJS = $ (srcs:.cpp=. O)7APP =EST $ (PROJ)8CFLAGS =-c-g-wall-i/opt/local/include9Ldflags =-l/opt/local/LibTenLIBS =-lcppunit-LDL One  A All : $ (APP) -  - $ (APP): $ (OBJS) the$ (CC) $ (ldflags) $ (OBJS)-o $ (APP) $ (LIBS) -  -%.O:%. cpp $ (HDRs) -$ (CC) $ (CFLAGS) $<-o [email protected] +  - Clean : +Rm-f *.O $ (APP)

Of course, the meaning of the above statement is generally understood, but the result of the operation is still problematic:

Error display: Test_point.h file cannot find the Point.h file, but from the above makefile statement, the syntax should be no error, should already contain the Point.h file, took a long time and did not find.

Summing up: Today, mainly spent a lot of time to understand the meaning of the makefile statement, the basic can understand the meaning of makefile, but also spent a lot of time to find errors, although the middle also found a lot of mistakes, but still have errors did not find out, feel the words: Should say, take some time should be able to achieve continuous integration. Of course, a person's strength is limited, if you have seniors help, progress should be faster. A simple mistake, I found that it may take half an hour, others found may be one eye, but also realize the "do high School" of the fun, encountered the wrong to find the reason, until the problem is also very good.

Further use of the TRAVIS-CI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.