lib/pkgforge/components/test.rb in pkgforge-0.4.8 vs lib/pkgforge/components/test.rb in pkgforge-0.4.9

- old
+ new

@@ -35,10 +35,18 @@ Contract Or[String, Array], Or[HashOf[String => String], {}, nil] => nil def run(cmd, env = {}) cmd.unshift('/usr/bin/env') if cmd.is_a? Array cmd << ';' if cmd.is_a? String env['PATH'] ||= './usr/bin' + env['LD_LIBRARY_PATH'] ||= ld_library_path @forge.test_run(cmd, env) + end + + private + + Contract None => String + def ld_library_path + @forge.deps.keys.map { |x| "#{dep(x)}/usr/lib" }.join(':') end end end end