Skip to content

Commit

Permalink
Update Travis to get tests working again
Browse files Browse the repository at this point in the history
* Remove build of capnproto
* Add creation of "holmes" user on the database to test
* Switch to IP-based connection (the unix socket is in a different place
  on my machine vs travis)
  • Loading branch information
maurer committed Jan 13, 2016
1 parent df02abc commit 90dab3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
17 changes: 3 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
language: rust
addons:
postgresql: 9.3

before_install:
- yes | sudo add-apt-repository ppa:ubuntu-toolchain-r/test
- sudo apt-get update
install:
- sudo apt-get install g++-4.8 gcc-4.8 git
- git clone https://github.com/kentonv/capnproto.git
- export CC=gcc-4.8
- export CXX=g++-4.8
- cd capnproto/c++
- ./setup-autotools.sh
- autoreconf -i
- ./configure && make -j5 && sudo make install && cd ../..

before_script:
- createuser -U postgres -ld holmes
- psql -c "ALTER USER holmes UNENCRYPTED PASSWORD 'holmes'" -U postgres
after_success:
- sudo apt-get install libcurl4-openssl-dev libelf-dev libdw-dev
- wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static DB_NUM : AtomicIsize = ATOMIC_ISIZE_INIT;

pub fn wrap<A>(test : Vec<&Fn(&mut Holmes) -> Result<A>>) {
let port_num = DB_NUM.fetch_add(1, SeqCst);
let db_addr = format!("postgresql://holmes@%2Ftmp/holmes_test{}", port_num);
let db_addr = format!("postgresql://holmes:holmes@localhost/holmes_test{}", port_num);
let db = DB::Postgres(db_addr);
for action in test.iter() {
let mut holmes = Holmes::new(db.clone()).unwrap();
Expand Down

0 comments on commit 90dab3f

Please sign in to comment.