Giter Club home page Giter Club logo

repairnator's Introduction

Build Status Coverage Status

Repairnator: a program repair bot for continuous integration

Repairnator is a software development bot that automatically repairs build failures on Travis CI. It scans failing Travis builds, tries to locally reproduce the failing build due to test failures and tries to repair it with program repair tools (e.g. Nopol and Astor).

About Repairnator

Academic papers

Press releases

Talks about Repairnator

Quickstart

The following is just a quickstart. For more advanced usage, go to read the usage section of our documentation.

Requirements

In order to run Repairnator with the provided scripts, you'll need:

  • git
  • docker
  • uuidgen utility tools (available for Mac & Linux)
  • a Github API key (Go to Github Personal Access Tokens, and click on "Generate new token".)

Setup Repairnator

All Repairnator scripts are located in the directory repairnator/scripts. The scripts use the global configuration set in repairnator/scripts/config/repairnator.cfg. You can define your own configuration in a file repairnator.cfg located in your home. For more information about repairnator.cfg read our complete documentation.

git clone https://github.com/Spirals-Team/repairnator/
cd repairnator

# edit the file to specify the mandatory elements (you must add the GitHub Personal Access Token here)
cp repairnator/scripts/config/repairnator.cfg ~
vi ~/repairnator.cfg

Launch Repairnator on a given Travis Build ID

From a Travis URL like this one: https://travis-ci.org/surli/test-repairnator/builds/352395977 you can retrieve a Build ID by taking the last part of the URL. Here it is: 352395977.

All you have to do to launch Repairnator to reproduce and try fixing this build is then to go in repairnator/scripts/ and launch repair_buggy_build.sh with the build ID as argument:

# set $HOME_REPAIR and $GITHUB_OAUTH in repairnator/scripts/config/repairnator.cfg
cp repairnator/scripts/config/repairnator.cfg ~
vi ~/repairnator.cfg

cd repairnator/scripts

# start a docker container and run Repairnator on your specified Build ID.
./repair_buggy_build.sh 352395977

# When the docker container is done you can find logs and serialized files in the `$HOME_REPAIR/logs` path.
ls $HOME_REPAIR/logs

Launch Repairnator to analyze and repair failing builds in real-time

You can launch Repairnator to analyze Travis CI builds in realtime and to repair failing ones.

First open your repairnator.cfg config file (see above) and edit the values under Realtime scanner configuration section:

  • DURATION is an optional value: if the value is left blank, the process will never stop; else it will last the specified duration (pay attention on the format, see: https://en.wikipedia.org/wiki/ISO_8601#Durations)
  • WHITELIST_PATH and BLACKLIST_PATH can be left on the default value, or you can use the files available in repairnator/repairnator-realtime/src/main/resources

Then just run the script launch_rtscanner.sh.

  • this generates build reproduction info and patches as local files in a folder named logs/
  • in this default setup, no MongoDB is used, no email notification is done

Integration

If you want to bring your own tool in Repairnator, have a look on contribution guidelines 😄

Content of the repository

This repository is organized as follows:

  • doc contains some documentation about Repairnator and its usage
  • repairnator is the main program dedicated to this project: it can automatically scan large set of projects, detect failing builds, reproduce them and try to repair them using our tools
  • bears-usage is a side project dedicated to gather data from repairnator.json files
  • resources contains mainly data produced by Repairnator and scripts to retrieve those data. It also contain the schema of repairnator.json files.
  • website contains all data to produce repairnator website

Each directory contains its own Readme explaining its own internal organization.

Releases

License

This project has been funded by InriaHub. The content of this repository is licensed under the MIT terms.

repairnator's People

Contributors

surli avatar fermadeiral avatar monperrus avatar btellstrom avatar vianneypayelle avatar

Watchers

James Cloos avatar Benjamin Loriot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.