diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..66916481c4c39584a914ba99a63a44dac275357c
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,45 @@
+stages:
+ - check_elig
+ - validate_tests
+ - validate_progs
+ - submit
+
+check_submitter_eligibility:
+ stage: check_elig
+ only:
+ - master
+ tags:
+ - "swen90006-tourney"
+ script:
+ - python3 ~/swen_tourney/frontend.py check_eligibility $(realpath $(pwd))
+ allow_failure: false
+
+validate_tests:
+ stage: validate_tests
+ only:
+ - master
+ tags:
+ - "swen90006-tourney"
+ script:
+ - python3 ~/swen_tourney/frontend.py validate_tests $(realpath $(pwd))
+ allow_failure: false
+
+validate_progs:
+ stage: validate_progs
+ only:
+ - master
+ tags:
+ - "swen90006-tourney"
+ script:
+ - python3 ~/swen_tourney/frontend.py validate_progs $(realpath $(pwd))
+ allow_failure: false
+
+submit:
+ stage: submit
+ only:
+ - master
+ tags:
+ - "swen90006-tourney"
+ script:
+ - python3 ~/swen_tourney/frontend.py submit $(realpath $(pwd))
+ allow_failure: false
diff --git a/Makefile b/Makefile
index 37e475baed42efc809fd5560badf64f3d4a90da5..b2512003306e5a14812a47df32c56fbedacee897 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ SRC=src
BIN=bin
INCLUDE=$(SRC)/include
-VERSIONS=original vuln-1 vuln-2 vuln-3 vuln-4 vuln-5
+VERSIONS ?= original vuln-1 vuln-2 vuln-3 vuln-4 vuln-5
VBINARIES=$(VERSIONS:%=%/$(BINARY))
BIN_TARGETS=$(VBINARIES:%=%-san) $(VBINARIES:%=%-fuzz) $(VBINARIES:%=%-cov)
@@ -54,5 +54,5 @@ $(BIN)/%-cov: $(SRC)/%.c $(HEADERS)
$(CLANG) $< $(CFLAGS) $(LDFLAGS) $(COV_FLAGS) $(NO_STRICT_OVERFLOW_CFLAGS) -o $@
clean:
- rm -f $(TARGETS) *.profraw *.profdata
+ rm -rf bin/* *.profraw *.profdata
diff --git a/run_tests.sh b/run_tests.sh
new file mode 100755
index 0000000000000000000000000000000000000000..444ff7b4327c89a4c04c1520f7555840132b284a
--- /dev/null
+++ b/run_tests.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+PROGRAM=$1
+USE_POC=$2
+
+if [ "$USE_POC" = "--use-poc" ]; then
+ # test program with its proof of concept test
+ ./bin/${PROGRAM}/passbook-san ./poc/${PROGRAM}.poc
+ exit $?
+else
+ # fuzz program with all tests in the tests/ folder
+ ./bin/${PROGRAM}/passbook-san ./tests/*
+ exit $?
+fi