specs/reports-libjava.rbspec
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 26 Oct 2016 22:48:38 +0000
changeset 64 02c00e68d367
parent 0 f46260ba26b1
child 109 d4103254e0a8
permissions -rw-r--r--
Merge

project :'stx:libjava:reports-common' do
  import :'stx:jv-branch:for-reports-only'

  tasks do

    redefine BUILD_DIR / 'stx' / 'librun' => BUILD_DIR do | t |
      checkout :'swing:private', 'stx/librun', :branch => 'branches/jv'
    end


    task :'test:pre' => [ BUILD_DIR / 'stx' / 'libjava' / 'tests' ,  ] do
        chdir BUILD_DIR / 'stx' / 'libjava' / 'libs' / 'java' do
      if win32? then
         cmd = 'ant.bat'
        else
         cmd = 'ant'
        end
          if not system cmd
            raise "Cannot run maven"
          end
        end
    end

    task :'install:jv:post' do
      bld_dir = BUILD_DIR / 'stx' / 'libjava'
      pkg_dir = $install_jv_dirs[:pkg_dir] / 'stx' / 'libjava'

      cp_rx bld_dir / 'examples' ,  pkg_dir / 'examples' do | fname |
        # fname is full path!!!
        /\.svn|CVS|\.cvsignore|tests/.match(fname) == nil
      end

      mkdir pkg_dir / 'java'
      cp_rx bld_dir / 'java' / 'libs' ,  pkg_dir /  'java' / 'libs' do | fname |
        # fname is full path!!!
        /\.svn|CVS|\.cvsignore|tests/.match(fname) == nil
      end

    end
  end
end

project :'stx:libjava:reports' do
  import :'stx:libjava:reports-common'
  package 'stx:libjava', :test => true#, :lint => true
end

project :'stx:libjava:mauve' do
  import :'stx:libjava:reports-common'
  package 'stx:libjava/tests/mauve', :test => true
end

project :'stx:libjava:experiments:reports' do
  import :'stx:libjava:reports-common'
  package 'stx:libjava/experiments', :test => true, :lint => true
end


project :'stx:libjava:tools:reports' do
  import :'stx:libjava:reports-common'
  package 'stx:libjava/tools', :test => true, :lint => true
end


project :'stx:libjava:benchmarks' do
  import :'stx:libjava:reports-common'
  tasks do
    task :'test:post' do
      chdir BUILD_DIR / 'stx' / 'libjava' / 'benchmarks' / 'java' do
        if not system 'ant'
          raise Exception.new("Running benchmarks failed")
        end
      end

      chdir BUILD_DIR / 'stx' / 'libjava' / 'benchmarks'  do
        if not system 'rake'
          raise Exception.new("Running benchmarks failed")
        end
      end
    end
  end
end