@@ -15,7 +15,7 @@ we formally define three different types of faults related to
15
15
incremental and parallel builds that
16
16
arise when a file access violates the specification of build.
17
17
Our testing approach operates as follows.
18
- First, it monitors the execution of a build script,
18
+ First, it monitors the execution of an instrumented build script,
19
19
and models this execution in ` BuildFS ` .
20
20
Our method then verifies the correctness of the build execution
21
21
by ensuring that there is no file access that leads to
@@ -37,7 +37,7 @@ docker build -t buildfs --build-arg IMAGE_NAME=<base-image> .
37
37
38
38
where ` <base-image> ` is the base Docker used to set up
39
39
the environment. We have tested our Docker script
40
- on ` ubuntu:18.04 ` base image .
40
+ on ` ubuntu:18.04 ` and ` debian:stable ` base images .
41
41
42
42
### Building from source
43
43
@@ -66,8 +66,63 @@ opam install -y ppx_jane core yojson dune fd-send-recv fpath
66
66
Finally, build ` BuildFS ` by running
67
67
68
68
``` bash
69
- dune build -p buildfs
70
- dune install
69
+ make
70
+ sudo make install
71
+ ```
72
+
73
+ This will build the ` buildfs ` executable and install
74
+ the scripts for instrumenting Make and Gradle builds
75
+ into the ` /usr/local/bin ` path.
76
+
77
+ ## Use BuildFS as standalone tool
78
+
79
+ Here, we describe how you can use ` BuildFS `
80
+ as a standalone tool (without employing a Docker image).
81
+ Currently, ` BuildFS ` has support for two well-established
82
+ and popular build systems (namely, GNU Make and Gradle).
83
+
84
+ ### Make Builds
85
+
86
+
87
+ You have analyze and test your Make builds by simply running
88
+ the following command
89
+ from the directory where your ` Makefile ` is located.
90
+
91
+ ```
92
+ buildfs make-build -mode online
93
+ ```
94
+
95
+ The command above executes your build,
96
+ and analyzes its execution.
97
+ It reports any missing inputs or ordering violations,
98
+ if your Make script is incorrect.
99
+
100
+ ### Gradle Builds
101
+
102
+
103
+ For Gradle builds, first you need to put the following three lines
104
+ of code inside your main ` build.grade ` file.
105
+
106
+ ``` groovy
107
+ plugins {
108
+ id "org.buildfs.gradle.buildfs-plugin" version "1.0"
109
+ }
110
+ ```
111
+
112
+ The code above applies our
113
+ [ org.buildfs.gradle.buildfs-plugin] ( https://plugins.gradle.org/plugin/org.buildfs.gradle.buildfs-plugin ) to your Gradle script
114
+ in order to enable our instrumentation.
115
+ The ` buildfs ` tool exploits this instrumentation
116
+ during the execution of the build,
117
+ to extract the specification of each Gradle task
118
+ (as written by the developers).
119
+
120
+ After modifying your Gradle script, analyze and test your Gradle script
121
+ by simply running the following command from the directory
122
+ where your ` gradlew ` file is stored.
123
+
124
+ ```
125
+ buildfs gradle-build -mode online -build-task build
71
126
```
72
127
73
128
### Usage
@@ -135,16 +190,13 @@ This is the sub-command for analyzing and detecting faults in Make scripts
135
190
(alias: -?)
136
191
```
137
192
193
+ ## Getting Started with Docker Image
138
194
139
-
140
- ## Getting Started
141
-
142
-
143
- Let's see how we run and analyze real-world builds using ` BuildFS ` .
144
- To do so, we will use the Docker image we created in the
145
- previous step so that we perform the build in a fresh environment.
195
+ After seeing how we can use ` BuildFS ` as a standalone tool,
196
+ it's time to see how we run and analyze real-world builds
197
+ through our Docker image.
146
198
Recall that this image contains all necessary dependencies for
147
- running the builds.
199
+ running the builds and scripts for producing multiple report files .
148
200
The image contains an entrypoint script that expects the following
149
201
options:
150
202
@@ -333,3 +385,15 @@ and no dependency has been specified between these tasks.
333
385
** NOTE** : In general,
334
386
Gradle builds take longer as they involve the download of JAR
335
387
dependencies and the setup of the Gradle Daemon.
388
+
389
+ ## Publications
390
+
391
+ The tool is described in detail in the following paper.
392
+
393
+ * Thodoris Sotiropoulos, Stefanos Chaliasos, Dimitris Mitropoulos, and Diomidis Spinellis. 2020.
394
+ [ A Model for Detecting Faults in Build Specifications] ( https://doi.org/10.1145/3428212 ) .
395
+ In Proceedings of the ACM on Programming Languages (OOPSLA '20), 2020, Virtual, USA,
396
+ 30 pages.
397
+ ([ doi:10.1145/3428212] ( https://doi.org/10.1145/3428212 ) )
398
+
399
+ The research artifact associated with this tool can be found at https://github.com/theosotr/buildfs-eval .
0 commit comments