Skip to content

Commit

Permalink
debug travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
trolldbois committed Aug 8, 2015
1 parent e089a36 commit d457150
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ before_install:
# we need sudo, and we need to have installed haystack for root.
install:
## install with requirements
- python setup.py install
# - python setup.py install
## or try the develop way to use the git tree
- pip install -r requirements.txt --use-mirrors
# - python setup.py develop
Expand Down Expand Up @@ -59,10 +59,10 @@ before_script:
- wget https://dl.dropboxusercontent.com/u/10222931/HAYSTACK/ssh.x64.6653.dump.tgz
- tar zxf ssh.x64.6653.dump.tgz
- mv ssh.x64.6653.dump test/dumps/ssh/
# build memory tests. The Makefile will build a 32 bits and 64 bits version
# of simple C program, and dump their memory.
# You need root for memory dumps.
# FIXME: package the memory dump in the tgz
# build memory tests.
# just uncompress the tgz contained in the LFS.
# the preps tests does not build the binaries on travis-ci anymore.
# no need for root. No need for install haystack.
- python setup.py preptests

script:
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def run(self):
import os
import sys
os.getcwd()
makeCmd = ['make', '-d']
# all dump files are in .tgz
#makeCmd = ['make', '-d']
#p = subprocess.Popen(makeCmd, stdout=sys.stdout, cwd='test/src/')
makeCmd = ['make', '-f', 'Makefile.prep']
p = subprocess.Popen(makeCmd, stdout=sys.stdout, cwd='test/src/')
p.wait()
return p.returncode
Expand Down
73 changes: 73 additions & 0 deletions test/src/Makefile.prep
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/usr/bin/make -f

LDFLAGS = -ldl
INCLS =

# use the virtualenv python even in sudo
PYTHON=$(shell which python)

USER=$(shell whoami)
G=$(shell groups)
GROUP=$(word 1, $(G))

EXTRA =

CFLAGS = -O2 -g -Wall $(INCLS) $(EXTRA)
CPPFLAGS = -O2 -g -Wall -stdlib=libstdc++ -x c++
CPPLIB = /usr/lib/gcc/i686-linux-gnu/4.8/
CPPINCLUDE = /usr/include/i386-linux-gnu/c++/4.8/
CC=clang
CXX=clang++

TGT32=i386-linux
TGT64=x86_64-linux

pid=

C2PY=clang2py

SRCS := $(wildcard *.c *.cpp)
OBJS32x := $(patsubst %.c,%.32,$(SRCS))
OBJS32 := $(patsubst %.cpp,%.32,$(OBJS32x))
OBJS64 := $(patsubst %.32,%.64,$(OBJS32))

PY32 := $(patsubst test-%.32,%_gen32.py,$(OBJS32))
PY64 := $(patsubst test-%.64,%_gen64.py,$(OBJS64))

DUMPS32 := $(patsubst %,%.dump,$(OBJS32))
OUTLOGS32 := $(patsubst %,%.stdout,$(OBJS32))
TGZ32 := $(patsubst %,%.dump.tgz,$(OBJS32))
DUMPS64 := $(patsubst %,%.dump,$(OBJS64))
OUTLOGS64 := $(patsubst %,%.stdout,$(OBJS64))
TGZ64 := $(patsubst %,%.dump.tgz,$(OBJS64))

.PHONY:


all: py unpack

unpack: $(DUMPS32) $(DUMPS64)

py: $(PY32) $(PY64)

%_gen32.py: test-%.c
$(C2PY) -k dstu -x $< -o $@ --target $(TGT32)

%_gen32.py: test-%.cpp
$(C2PY) -k dstu -x $< -o $@ --target $(TGT32)

%_gen64.py: test-%.c
$(C2PY) -k dstu -x $< -o $@ --target $(TGT64)

%_gen64.py: test-%.cpp
$(C2PY) -k dstu -x $< -o $@ --target $(TGT64)

%.dump: %.dump.tgz
tar zxf $<

clean:
rm -f $(PY32) $(PY64)
rm -rf $(DUMPS32) $(DUMPS64)
rm -f *~ *.pyc


0 comments on commit d457150

Please sign in to comment.