Skip to content

jamie401/myProject

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myProject

Use the makefile to compile the c++ file and run the test with googleTest.

Follow the steps to complete settings. You need to setup the compile environment on your PC to run the project with test, and add webhook for your repository that can trigger CI server to do the building and running automated test.

This project is only used to create the environment, you should clean it when HW1.

Updata

  • Thu Sep 14 2017 14:56:35

Modify makefile.

Notice that Mac's googleTest installation guide, the command should be amended.

Original:
sudo cp -r gtest-1.7.0/include /usr/local/Cellar/gtest/

Modified:
sudo cp -r gtest-1.7.0/include/ /usr/local/Cellar/
  • Wed Sep 13 2017 14:12:35

About <studentId>, you should replace whole brackets not just "studentId". That is ok on email subject , but you should be careful the webhook.

Good:
http://140.124.181.114:8080/buildByToken/build?job=1055980XX&token=1055980XX

Bad:
http://140.124.181.114:8080/buildByToken/build?job=<1055980XX>&token=<1055980XX>

And about your own repository, if you want to test your CI job is setup or not: init your repository and place this project's file, commit and push a simple change, and go to CI server to check the job result.

1. How to set up everything on your PC

Prerequisites

Install GoogleTest in different platforms

Running the tests

cd <your/project/path>
make
./exp

After run the exp file, you should get the result like that: Imgur

2. How to set up everything for CI server

You already have an account on the CI server. Username and password is your student id, so your need to reset password first. Imgur

Create a new repository

https://github.com/new

Name your repository whatever you want, and place this project's file to your own repository(exclude .git folder).

Add WebHook to repository

On repository page -> Settings -> Webhooks -> Add webhook -> set Payload URL :

http://140.124.181.114:8080/buildByToken/build?job=<studentId>&token=<studentId>

And it should show the green tick.

Imgur

Email your repository url to TA

Email to posd2017f@gmail.com. Just need subject, no content required.

Subject: <studentId>, <repositoryURL>

Imgur

After email

Wait TA for setting, your CI job will be triggered to run test after every push.

Done

If you have some problems that you really don't know why and how to solve it, email us: posd2017f@gmail.com or come to 1321 in office hours (Fri. 2pm to 4pm).

About

Use the makefile to compile the c++ file and run the test with googleTest.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 95.2%
  • Makefile 4.8%