1

目前,Origen 测试程序生成器在配置输出目录的位置下创建子目录:

mbist/
|-- origen
|   |-- mbist_flow.rb
|   |-- mbist_params.rb
|   |-- testflow
|   |   |-- mfh.testflow.group
|   |   |   `-- Flow_mbist.tf

我们需要将生成的 V93K .tf 文件向上移动 2 个目录,以便另一个工具可以找到它。我检查了回调文档,但没有一个看起来可以工作,因为我相信文件句柄仍然是打开的。有没有办法通过回调来做到这一点,或者为生成命令传递一个选项来不创建子目录...rake?

谢谢

** 编辑 ***

这是根据 Ginty 的工作代码:

def write_files(options = {})
  super
  Dir.glob("#{Origen.top_level.test_modules(default_test_module).output_dir}/testflow/mfh.testflow.group/Flow*.tf").each do |f|
    Origen.log.info("Moving #{f.split('/')[-1]} to #{Origen.top_level.test_modules(default_test_module).output_dir}/#{f}")
    FileUtils.mv f, Origen.top_level.test_modules(default_test_module).output_dir
  end
  FileUtils.rm_rf "#{Origen.top_level.test_modules(default_test_module).output_dir}/testflow"
  Origen.log.info("Deleted #{Origen.top_level.test_modules(default_test_module).output_dir}/testflow")
end
4

1 回答 1

1

是的,现在这是硬编码的,但最终我希望看到它可以通过测试器对象进行配置 - https://github.com/Origen-SDK/origen_testers/blob/master/lib/origen_testers/smartest_based_tester/base/flow .rb#L17

与此同时,另一种方法可能是在您的界面中覆盖此方法:https ://github.com/Origen-SDK/origen_testers/blob/master/lib/origen_testers/interface.rb#L156

def write_files(options = {})
  super
  # Move stuff around here
end

此外,并非所有事情都需要通过回调来完成。在我的应用程序中,我通常处理此类事情的方式是origen build在我的应用程序中发出命令。

这本质上只是一个脚本,它调用必要的 Origen 命令来构建程序,例如..

system("origen p #{Origen.root!}/program/full.list -o #{dist_dir}/device --list #{Origen.target.name}.list")

然后,您可以轻松地添加额外的代码来移动事物以创建您的特定交付包结构。

于 2018-02-27T13:30:08.307 回答