Class: Test

Inherits:
Binary show all
Defined in:
lib/makeconf/test.rb

Overview

An executable binary file used for testing

Instance Attribute Summary

Attributes inherited from Buildable

#buildable, #cflags, #distributable, #enable, #id, #installable, #ldadd, #localdep, #output, #output_type, #project, #rpath, #sources, #sysdep, #topdir

Instance Method Summary collapse

Methods inherited from Binary

#DEADWOOD_build

Methods inherited from Buildable

#binary?, #expand_sources, #finalize, #library?, #library_type, #makedepends, #objects

Constructor Details

#initialize(options) ⇒ Test

Returns a new instance of Test.



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/makeconf/test.rb', line 4

def initialize(options)
  super(options)

  @installable = false
  @distributable = false

  @ldflags = [ '-rpath .' ]

  # Assume that unit tests should be debuggable
  @cflags.push('-g', '-O0') unless Platform.is_windows?
end

Instance Method Details

#buildObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/makeconf/test.rb', line 17

def build
  makefile = super()

  unless SystemType.host =~ /-androideabi$/
    makefile.add_dependency('check', @id)
    makefile.add_rule('check', './' + @id)
  end

  return makefile
end