File: add-task.rb

package info (click to toggle)
libsetup-ruby 3.4.1-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny, squeeze
  • size: 284 kB
  • ctags: 231
  • sloc: ruby: 1,373; makefile: 43; sh: 21
file content (15 lines) | stat: -rw-r--r-- 344 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# add original task using hook file
#

ToplevelInstaller::TASKS.push ['test', 'run test.']
ToplevelInstaller.module_eval {
  def exec_test
    raise "test.rb not given; cannot test this package."\
        unless File.file?("#{srcdir_root()}/test.rb")
    old = Dir.pwd
    Dir.chdir srcdir_root()
    load 'test.rb'
    Dir.chdir old
  end
}