(root_path)
| 34 | os.system('scons --directory=' + project_dir + command + ' > 1.txt') |
| 35 | |
| 36 | def update_all_project_files(root_path): |
| 37 | # current path is dir |
| 38 | if os.path.isdir(root_path): |
| 39 | projects = os.listdir(root_path) |
| 40 | # is a project path? |
| 41 | if "SConstruct" in projects: |
| 42 | try: |
| 43 | # update rtconfig.h and .config |
| 44 | if "Kconfig" in projects: |
| 45 | if "win32" in sys.platform: |
| 46 | retval = os.getcwd() |
| 47 | os.chdir(root_path) |
| 48 | os.system("menuconfig --silent") |
| 49 | os.chdir(retval) |
| 50 | else: |
| 51 | os.system('scons --pyconfig-silent -C {0}'.format(root_path)) |
| 52 | update_project_file(root_path) |
| 53 | except Exception as e: |
| 54 | print("error message: {}".format(e)) |
| 55 | sys.exit(-1) |
| 56 | else: |
| 57 | for i in projects: |
| 58 | new_root_path = os.path.join(root_path, i) |
| 59 | update_all_project_files(new_root_path) |
| 60 | |
| 61 | # get command options |
| 62 | command = '' |
no test coverage detected