File tree Expand file tree Collapse file tree 2 files changed +35
-23
lines changed Expand file tree Collapse file tree 2 files changed +35
-23
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,38 @@ ENV JVM_LD_LIBRARY_PATH $JAVA_HOME/lib/server
21
21
ENV PATH $PATH:$JAVA_HOME/bin
22
22
ENV JAZZER_API_PATH "/usr/local/lib/jazzer_api_deploy.jar"
23
23
24
- RUN install_java.sh
24
+ RUN install_java.sh
25
+
26
+ RUN chmod 777 /usr/local/bin && chmod 777 /usr/local/lib
27
+
28
+ RUN useradd -m jazzer_user
29
+
30
+ USER jazzer_user
31
+
32
+ WORK
10000
DIR $SRC
33
+
34
+ RUN git clone https://github.com/CodeIntelligenceTesting/jazzer && \
35
+ cd jazzer && \
36
+ git checkout e219dfe2c3299b315aaebe19951e7799a3105794
37
+
38
+ WORKDIR $SRC/jazzer
39
+
40
+ RUN echo "build --java_runtime_version=local_jdk_15" >> .bazelrc \
41
+ && echo "build --cxxopt=-stdlib=libc++" >> .bazelrc \
42
+ && echo "build --linkopt=-lc++" >> .bazelrc
43
+
44
+ RUN bazel build \
45
+ //src/main/java/com/code_intelligence/jazzer:jazzer_standalone_deploy.jar \
46
+ //deploy:jazzer-api \
47
+ //launcher:jazzer
48
+
49
+ RUN cp $(bazel cquery --output=files //src/main/java/com/code_intelligence/jazzer:jazzer_standalone_deploy.jar) /usr/local/bin/jazzer_agent_deploy.jar && \
50
+ cp $(bazel cquery --output=files //launcher:jazzer) /usr/local/bin/jazzer_driver && \
51
+ cp $(bazel cquery --output=files //deploy:jazzer-api) $JAZZER_API_PATH
52
+
53
+ USER root
54
+
55
+ RUN rm -rf /home/jazzer_user/.cache/bazel /home/jazzer_user/.cache/bazelisk && \
56
+ rm -rf $SRC/jazzer
57
+
58
+ RUN chmod 755 /usr/local/bin && chmod 755 /usr/local/lib
Original file line number Diff line number Diff line change @@ -22,25 +22,3 @@ mkdir -p $JAVA_HOME
22
22
tar -xz --strip-components=1 -f openjdk-15.0.2_linux-x64_bin.tar.gz --directory $JAVA_HOME && \
23
23
rm -f openjdk-15.0.2_linux-x64_bin.tar.gz
24
24
rm -rf $JAVA_HOME /jmods $JAVA_HOME /lib/src.zip
25
-
26
- # Install the latest Jazzer in $OUT.
27
- # jazzer_api_deploy.jar is required only at build-time, the agent and the
28
- # drivers are copied to $OUT as they need to be present on the runners.
29
- cd $SRC /
30
- git clone https://github.com/CodeIntelligenceTesting/jazzer && \
31
- cd jazzer && \
32
-
33
- # Latest fix followig a depedency issue: (https://github.com/CodeIntelligenceTesting/jazzer/issues/896)
34
- git checkout 96205feebc7135075ffa48aae3f22e38cae5dc45
35
- cat << 'EOF ' >> .bazelrc
36
- build --java_runtime_version=local_jdk_15
37
- build --cxxopt=-stdlib=libc++
38
- build --linkopt=-lc++
39
- EOF
40
-
41
- bazel build //src/main/java/com/code_intelligence/jazzer:jazzer_standalone_deploy.jar //deploy:jazzer-api //launcher:jazzer
42
- cp $( bazel cquery --output=files //src/main/java/com/code_intelligence/jazzer:jazzer_standalone_deploy.jar) /usr/local/bin/jazzer_agent_deploy.jar
43
- cp $( bazel cquery --output=files //launcher:jazzer) /usr/local/bin/jazzer_driver
44
- cp $( bazel cquery --output=files //deploy:jazzer-api) $JAZZER_API_PATH
45
- rm -rf ~ /.cache/bazel ~ /.cache/bazelisk
46
- rm -rf $SRC /jazzer
You can’t perform that action at this time.
0 commit comments