Skip to content
This repository was archived by the owner on Oct 3, 2021. It is now read-only.

Commit 163d3eb

Browse files
Merge branch fix_diff_build into reuse
2 parents 7ebedc9 + 062fb59 commit 163d3eb

File tree

1,073 files changed

+126094
-21078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,073 files changed

+126094
-21078
lines changed

.gitlab-ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,15 @@ java:
115115
tags:
116116
- privileged
117117

118+
java-format:
119+
stage: checks
120+
image: openjdk:11
121+
script: "java/check-format.sh"
122+
cache:
123+
key: "$CI_JOB_NAME"
124+
paths:
125+
- "java/*.jar"
126+
118127
.build-docker:
119128
image:
120129
name: gcr.io/kaniko-project/executor:debug

.travis.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ if: type = pull_request
1111
language: c
1212
env:
1313
matrix:
14-
- NAME="Sanity checks" DOCKER_IMAGE=sanity-checks COMMAND="c/check.py"
15-
- NAME="Preprocessing consistency checks" DOCKER_IMAGE=preprocessing-consistency COMMAND="cd c; ./diff_ci.sh './compare.py --keep-going --skip-large --directory'"
16-
- NAME="gcc-5" DOCKER_IMAGE=gcc:5 COMMAND="gcc-5 -v --version; cd c; ./diff_ci.sh 'make -j2 CC=gcc-5 -C'"
17-
- NAME="clang-3.9" DOCKER_IMAGE=clang:3.9 COMMAND="clang-3.9 -v --version; cd c; ./diff_ci.sh 'make -j2 CC=clang-3.9 -C'"
18-
- NAME="java" DOCKER_IMAGE=java COMMAND="java/check-compile.sh"
14+
- NAME="Sanity checks" DOCKER_IMAGE=registry.gitlab.com/sosy-lab/software/sv-benchmarks/ci/sanity-checks COMMAND="c/check.py"
15+
- NAME="Preprocessing consistency checks" DOCKER_IMAGE=registry.gitlab.com/sosy-lab/software/sv-benchmarks/ci/preprocessing-consistency COMMAND="cd c; ./diff_ci.sh './compare.py --keep-going --skip-large --directory'"
16+
- NAME="gcc-5" DOCKER_IMAGE=registry.gitlab.com/sosy-lab/software/sv-benchmarks/ci/gcc:5 COMMAND="gcc-5 -v --version; cd c; ./diff_ci.sh 'make -j2 CC=gcc-5 -C'"
17+
- NAME="clang-3.9" DOCKER_IMAGE=registry.gitlab.com/sosy-lab/software/sv-benchmarks/ci/clang:3.9 COMMAND="clang-3.9 -v --version; cd c; ./diff_ci.sh 'make -j2 CC=clang-3.9 -C'"
18+
- NAME="java" DOCKER_IMAGE=registry.gitlab.com/sosy-lab/software/sv-benchmarks/ci/java COMMAND="java/check-compile.sh"
19+
- NAME="java-format" DOCKER_IMAGE=openjdk:11 COMMAND="java/check-format.sh"
1920

2021
# Hint to TravisCI that we want to use their container infrastructure
2122
sudo: required
@@ -27,7 +28,7 @@ git:
2728
depth: 3
2829

2930
before_install:
30-
- docker pull registry.gitlab.com/sosy-lab/software/sv-benchmarks/ci/${DOCKER_IMAGE}
31+
- docker pull ${DOCKER_IMAGE}
3132

3233
script:
33-
- docker run --privileged --tty --volume "$(pwd):$(pwd)" registry.gitlab.com/sosy-lab/software/sv-benchmarks/ci/${DOCKER_IMAGE} /bin/sh -c "cd $(pwd); ${COMMAND}"
34+
- docker run --privileged --tty --volume "$(pwd):$(pwd)" ${DOCKER_IMAGE} /bin/sh -c "cd $(pwd); ${COMMAND}"

c/NoDataRace-Main.set

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ pthread/*.yml
44
pthread-atomic/*.yml
55
pthread-ext/*.yml
66
pthread-lit/*.yml
7+
goblint-regression/*.yml

c/diff_ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ find_parent_with_Makefile() {
3939
relevant_diff=`git diff --name-only --diff-filter=d origin/master... -- './*.i' './*.c' './*.h'`
4040
[ -z "$relevant_diff" ] && echo "Found nothing to build!!" && exit
4141
# dirs is the list of directories from the changed files
42-
dirs=`echo $relevant_diff | xargs dirname | cut -d/ -f2- | sort | uniq`
42+
dirs=`echo $relevant_diff | xargs dirname | cut -d/ -f2- -s | sort | uniq`
4343

4444
printf "Selected following directories for diff build: \n$dirs \n"
4545
for d in $dirs
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <stdlib.h>
2+
#include <pthread.h>
3+
4+
int glob;
5+
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
6+
7+
void *t_fun(void *arg) {
8+
pthread_mutex_lock(&mutex);
9+
glob++; // RACE!
10+
pthread_mutex_unlock(&mutex);
11+
return NULL;
12+
}
13+
14+
int main(void) {
15+
pthread_t id;
16+
pthread_create(&id, NULL, t_fun, NULL);
17+
glob++; // RACE!
18+
return 0;
19+
}

0 commit comments

Comments
 (0)