Open AlexDaniel opened 7 years ago
FWIW:
git grep 'os\.system'
Scripts/include/file_gen.py: return_value = os.system(net_gen_command)
Scripts/include/file_gen.py: return_value = os.system(net_tb_gen_command)
Scripts/include/file_gen.py: return_value = os.system(wave_do_gen_command)
Tools/Minimization_Tool/area_coverage_calc.py: os.system("sh ./synthesis_script.sh" + " " + package_file.module_file_name + " " + checkers_file_name + " " +
simulate.py: return_value = os.system("vsim -c -do " + package.SIMUL_DO_SCRIPT)
simulate.py: return_value = os.system("vsim -do " + package.SIMUL_DO_SCRIPT)
simulate.py: return_value = os.system(latency_command)
As I go through some stuff, I notice issues outside of my scope. I will probably file everything I see.
In simulate.py,
os.system
is used to run a command. The command includes a couple of variables for paths, and some of these paths are based on project root. My best guess is that there is no guarantee thatPROJECT_ROOT
will not contain spaces,*
,$
and other characters that are specially treated by shells.The solution is quite simple, just rework lines with
os.system
to usesubprocess.call
.