|
1 | 1 | from pydriller import Repository
|
2 | 2 | import os
|
3 | 3 | import datetime
|
4 |
| -os.system("cp examples/speedtest.py examples/speedtest2.py") |
5 |
| -for commit in Repository('.', from_tag="v0.5.2").traverse_commits(): |
6 |
| - print(commit.hash) |
7 |
| - print(commit.msg) |
| 4 | +os.system("cp examples/speedtest.py examples/speedtest2.py") # the file has to be outside of git |
| 5 | +for idx, commit in enumerate(Repository('.', from_tag="v0.6.0").traverse_commits()): |
| 6 | + name=commit.msg.replace('\n', ' ').replace('\r', ' ') |
| 7 | + print(idx, commit.hash, name) |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +for commit in Repository('.', from_tag="v0.6.0").traverse_commits(): |
| 12 | + |
| 13 | + name=commit.msg.replace('\n', ' ').replace('\r', ' ') |
| 14 | + print(commit.hash, name) |
8 | 15 |
|
9 | 16 | os.system(f"git checkout {commit.hash}; rm -rf build; ")
|
10 |
| - os.system("python -m pip install .") |
11 |
| - os.system(f'python examples/speedtest2.py -n "{commit.msg}" -d 4 -t 1') |
12 |
| - os.system(f'python examples/speedtest2.py -n "{commit.msg}" -d 64 -t 1') |
13 |
| - os.system(f'python examples/speedtest2.py -n "{commit.msg}" -d 128 -t 1') |
14 |
| - os.system(f'python examples/speedtest2.py -n "{commit.msg}" -d 4 -t 24') |
15 |
| - os.system(f'python examples/speedtest2.py -n "{commit.msg}" -d 128 -t 24') |
| 17 | + print("\n\n--------------------\n\n") |
| 18 | + ret=os.system("python -m pip install .") |
| 19 | + print(ret) |
| 20 | + |
| 21 | + if ret != 0: |
| 22 | + print ("build failed!!!!") |
| 23 | + print ("build failed!!!!") |
| 24 | + print ("build failed!!!!") |
| 25 | + print ("build failed!!!!") |
| 26 | + continue |
| 27 | + |
| 28 | + os.system(f'python examples/speedtest2.py -n "{name}" -d 4 -t 1') |
| 29 | + os.system(f'python examples/speedtest2.py -n "{name}" -d 64 -t 1') |
| 30 | + os.system(f'python examples/speedtest2.py -n "{name}" -d 128 -t 1') |
| 31 | + os.system(f'python examples/speedtest2.py -n "{name}" -d 4 -t 24') |
| 32 | + os.system(f'python examples/speedtest2.py -n "{name}" -d 128 -t 24') |
| 33 | + |
16 | 34 |
|
0 commit comments