Skip to content
Snippets Groups Projects
build.sh 405 B
Newer Older
  • Learn to ignore specific revisions
  • hluk's avatar
    hluk committed
    #!/bin/bash
    # Build and run tests with Travis CI.
    
    
    set -e
    
    root=$PWD
    mkdir build
    cd build
    
    
    hluk's avatar
    hluk committed
    # Configure.
    if [ "$CC" == "gcc" ]; then
        # GCC build generates coverage.
    
        qmake CONFIG+=debug QMAKE_CXXFLAGS+=--coverage QMAKE_LFLAGS+=--coverage ..
    
    hluk's avatar
    hluk committed
    else
    
        qmake CONFIG+=debug ..
    
    hluk's avatar
    hluk committed
    fi
    
    # Build.
    make
    
    # Run tests.
    export DISPLAY=:99.0
    sh -e /etc/init.d/xvfb start
    sleep 3
    openbox &
    ./copyq tests
    
    
    cd "$root"