| 37 | |
| 38 | |
| 39 | def read_entries(test): |
| 40 | with open(abs_path(test.entries_file), "r") as f: |
| 41 | lines = f.readlines() |
| 42 | |
| 43 | lines = [line.strip() for line in lines] |
| 44 | lines = [line for line in lines if line] |
| 45 | |
| 46 | test.entries = [] |
| 47 | test.whitelist = [] |
| 48 | |
| 49 | for line in lines: |
| 50 | # line is comment |
| 51 | if line.startswith("#"): |
| 52 | line = line[1:].strip() |
| 53 | # whitelist entry |
| 54 | if line.startswith("tensorflow/"): |
| 55 | test.whitelist.append(line) |
| 56 | # line has comment -> strip comment |
| 57 | elif line.find("#") != -1: |
| 58 | line = line[:line.find("#")].strip() |
| 59 | test.entries.append(line) |
| 60 | else: |
| 61 | test.entries.append(line) |
| 62 | |
| 63 | |
| 64 | def test_invalid_directories(test): |