From a9f09b3697e34e2073aef849a1b853774b65e2c7 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Wed, 23 Jan 2019 00:03:43 +0100 Subject: gitlab-ci test some executables Signed-off-by: Toni Uhlig --- .gitlab-ci.yml | 14 ++++++++++++++ Makefile | 10 ++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56cbf98..7a6d923 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ image: debian:stable-slim stages: - build + - test build: script: @@ -9,5 +10,18 @@ build: - apt-get install -y make binutils nasm gcc libc6-dev libc6-dev-i386 - make -j4 V=s stage: build + artifacts: + untracked: true + only: + - master + +test: + script: + - ./funcjmp_simple_x86 || test $? -eq 66 + - ./funcjmp_ext_x86 || test $? -eq 66 + - ./exec_crypter + stage: test + dependencies: + - build only: - master diff --git a/Makefile b/Makefile index 8eb68e2..4267106 100644 --- a/Makefile +++ b/Makefile @@ -31,15 +31,17 @@ exec_payload_bin.o: exec_payload $(STRIP) -s $< $(AS) -felf32 -o $@ exec_crypter.asm -exec_crypter: exec_payload_bin.o - $(CC) $(ECFLAGS) -m32 -D_NOTASKID=1 -o $@ $< exec_crypter.c +exec_crypter: exec_payload_bin.o exec_crypter.c + $(CC) $(ECFLAGS) -m32 -D_NOTASKID=1 -o $@.o -c $@.c + $(CC) $(ECFLAGS) -m32 -D_NOTASKID=1 -o $@ $(patsubst %.c,%.o,$^) exec_payload_x64_bin.o: exec_payload_x64 $(STRIP) -s $< $(AS) -felf64 -o $@ exec_crypter_x64.asm -exec_crypter_x64: exec_payload_x64_bin.o - $(CC) $(ECFLAGS) -m64 -D_NOTASKID=1 -o $@ $< exec_crypter.c +exec_crypter_x64: exec_payload_x64_bin.o exec_crypter.c + $(CC) $(ECFLAGS) -m64 -D_NOTASKID=1 -o $@.o -c exec_crypter.c + $(CC) $(ECFLAGS) -m64 -D_NOTASKID=1 -o $@ exec_payload_x64_bin.o exec_crypter_x64.o debug: $(MAKE) -C . CFLAGS="-g" -- cgit v1.2.3