|
1 | 1 | import os |
| 2 | +import pathlib |
2 | 3 |
|
| 4 | +import config |
3 | 5 | from diff import gen_diff |
4 | 6 | from index import gen_index |
5 | 7 | from utils import check_call |
6 | 8 | import shutil |
7 | 9 |
|
8 | 10 |
|
9 | 11 | def debug_main(): |
10 | | - # pull some repos for test |
11 | | - check_call(["git", "clone", "--depth=2", "https://github.com/gin-gonic/gin.git"]) |
| 12 | + # clone junit4 repository |
| 13 | + check_call( |
| 14 | + ["git", "clone", "--depth=2", "https://github.com/junit-team/junit4.git"] |
| 15 | + ) |
| 16 | + junit4_dir = pathlib.Path(config.USER_DIR) / "junit4" |
| 17 | + gen_index( |
| 18 | + "java", |
| 19 | + junit4_dir.as_posix(), |
| 20 | + "scip-java index -- " |
| 21 | + "package -DskipTests " |
| 22 | + "--batch-mode " |
| 23 | + "--errors " |
| 24 | + "--settings .github/workflows/settings.xml", |
| 25 | + ) |
| 26 | + os.chdir(junit4_dir) |
| 27 | + gen_diff(junit4_dir.as_posix(), "HEAD~1", "HEAD", "") |
| 28 | + os.chdir(config.USER_DIR) |
| 29 | + shutil.rmtree(junit4_dir) |
12 | 30 |
|
| 31 | + # clone gin repository |
| 32 | + check_call(["git", "clone", "--depth=2", "https://github.com/gin-gonic/gin.git"]) |
13 | 33 | gen_index("golang", "gin", "") |
14 | | - |
15 | 34 | os.chdir("gin") |
16 | 35 | gen_diff("HEAD~1", "HEAD", "") |
17 | 36 | os.chdir("..") |
18 | | - |
19 | | - # clean up |
20 | 37 | shutil.rmtree("gin") |
| 38 | + |
| 39 | + # clone requests repository |
| 40 | + check_call(["git", "clone", "--depth=2", "https://github.com/psf/requests.git"]) |
| 41 | + gen_index("python", "requests", "") |
| 42 | + os.chdir("requests") |
| 43 | + gen_diff("HEAD~1", "HEAD", "") |
| 44 | + os.chdir("..") |
| 45 | + shutil.rmtree("requests") |
0 commit comments