Skip to content

Commit 6211c27

Browse files
authored
Added system setup instructions + fixed bug in bug.py:info (#29)
1 parent 96dc934 commit 6211c27

File tree

2 files changed

+37
-17
lines changed

2 files changed

+37
-17
lines changed

README.md

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,45 @@ GitBug-Java is a reproducible Java benchmark of recent bugs.
77
## Setup GitBug-Java
88

99
Requirements:
10-
- Python
11-
- Poetry
12-
- Docker
10+
- Python (Recommended 3.11)
11+
- Poetry (Recommended 1.8 and higher)
12+
- Docker (v20 or higher)
13+
- If you are on Ubuntu/Debian, choose a system with GLIBC 2.32 or 2.34 as some of the dependencies require these versions (A docker image would not be suitable as it would require DinD).
14+
15+
For example you can create a virtual machine of ubuntu 21.10 (glibc 2.32). Here is a quick setup of an ubuntu VM:
16+
- Install multipass (allows to quickly create ubuntu VMs and works on Linux/Mac/Windows). Follow instructions here: https://multipass.run/docs/install-multipass.
17+
- create an ubuntu image (e.g, 280G in disk space, 16G in memory and 2 cpus):
18+
```bash
19+
multipass launch 21.10 --disk 280G --memory 16G --cpus 2
20+
```
21+
- login the newly created VM
22+
```bash
23+
multipass shell VM-NAME-PRINTED-LAST-STEP
24+
```
25+
- install docker within the image and add the user to the docker group
26+
27+
Once the above requirements are satisfied within your system or the VM machine is created, clone this repository and execute the following steps:
1328

1429
1. Setup Python environment
15-
```bash
16-
poetry shell
17-
poetry install --no-root
18-
```
30+
```bash
31+
poetry shell
32+
poetry install --no-root
33+
```
1934

20-
2. Add GitBug-Java and custom Act version to path
21-
```bash
22-
export PATH="$(pwd):$(pwd)/bin:$PATH"
23-
```
35+
**Note:** Poetry shell will attempt to create a new virtual environment.
36+
However, if you are already inside a virtual environment, poetry will use the that environment.
37+
In such case, the subsequent commands would only work with a Python3.11 environment.
2438

25-
3. Run Setup (Installs Docker Image ~50GiB, downloads required dependencies ~80GiB)
26-
```bash
27-
gitbug-java setup
28-
```
39+
2. Add GitBug-Java and custom Act version to path
40+
```bash
41+
export PATH="$(pwd):$(pwd)/bin:$PATH"
42+
```
43+
**Note:** The above command needs to be executed on every new shell instance
44+
45+
3. Run Setup (Installs Docker Image ~50GiB, downloads required dependencies ~80GiB). The downloadable data size is around 130GB. However, after unzipping files, the space taken goes up to 240GB (it goes down after deleting the zipped files).
46+
```bash
47+
gitbug-java setup
48+
```
2949

3050
**NOTE: Ensure that all `gitbug-java` commands are executed without using `sudo` to guarantee correct functionality.**
3151

gitbug/bug.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ def info(self) -> str:
338338
```
339339
340340
### Failing Tests
341-
{"".join(f"- {test['classname']}#{test['name']}\n\t- {test["results"][0]['type']}\n\t- {test["results"][0]['message']}" for test in failing_tests)}
342-
"""
341+
""" + "\n".join(f"- {test['classname']}#{test['name']}\n\t- {test['results'][0]['type']}\n\t- {test['results'][0]['message']}" for test in failing_tests)
342+
343343

344344
def __str__(self) -> str:
345345
return self.bid

0 commit comments

Comments
 (0)