specs/reports-misc.rbspec
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 25 May 2016 13:50:49 +0100
changeset 10 cb3e0e3ca28f
parent 0 f46260ba26b1
child 11 f7dc950d8df8
permissions -rw-r--r--
Fixed repository specifications to allow anonymous checkout. For CVS, use eXept's public CVS repository. For Mercurial / Subversion repositories, use HTTP rather than SSH. The downside is that if anyone wanting commit would have to configure push URL for Mercurial repositories.

# This file contains various test projects

project :'stx:libscm/git:reports' do
  import :'stx:jv-branch:for-reports-only'


  repository :'bitbucket:janvrany'

  package 'stx:libscm/common', :test => true, :lint => true, :link => false
  package 'stx:libscm/git', :test => true, :lint => true, :link => false

end

project :'stx:libscm/mercurial:reports' do
  import :'stx:jv-branch:for-reports-only'

  repository :'bitbucket:janvrany'
  package 'stx:libscm'
  package 'stx:libscm/common',    :link => false, :lint => true
  package 'stx:libscm/mercurial', :link => false, :lint => true

  tasks do
    task :'test:post' => REPORT_DIR do
	   setup = ''
       if ENV['STX_LIBSCM_MERCURIAL_HG_VERSION'] != nil then
	     hgversion = ENV['STX_LIBSCM_MERCURIAL_HG_VERSION']
		 hgroot = ENV['STX_LIBSCM_MERCURIAL_HG_VERSIONS_ROOT']
		 if hgroot == nil then
		   raise Exception.new("STX_LIBSCM_MERCURIAL_HG_VERSION defined but not STX_LIBSCM_MERCURIAL_HG_VERSIONS_ROOT!")
		 end
		 hgdir = File.join(hgroot, hgversion)
		 if win32?
		   hgexe = "python #{hgroot}\\#{hgversion}\\Python27\\Scripts\\hg"
		 else
		   hgexe = File.join(hgroot, hgversion, 'usr', 'local', 'bin' , 'hg')
		 end
		 setup = "-S \"Class tryLocalSourceFirst: true. UserPreferences current hgCommand:'#{hgexe}'\""
	   end

       run_report(project.application, [ 'stx:libscm/mercurial' ], 'Builder::TestReport', setup, '--coverage  -I stx:libscm/common')
	end
  end

end

project :'stx:libscm/mercurial:reports:6.2.2' do
  import :'stx:repositories'
  import :'stx:6.2.2'

  repository :'bitbucket:janvrany'
  package 'stx:libscm'
  package 'stx:libscm/common',    :link => false#, :test => true, :lint => true, :coverage => true # Coverage not suypported in 6.2.2
  package 'stx:libscm/mercurial', :link => false, :test => true, :lint => true#, :coverage => true

  # Little hack to enforce package compilation
  tasks do
    task :'compile:post' => [ :'stx:libscm/common' , :'stx:libscm/mercurial' ]
  end

end

project :'stx:goodies/petitparser:reports' do
  import :'stx:jv-branch:for-reports-only'

  package 'stx:goodies/petitparser', :link => false, :test => true, :lint => true, :coverage => true
  package 'stx:goodies/petitparser/analyzer', :link => false, :test => true, :lint => true, :coverage => true
  package 'stx:goodies/petitparser/compiler/tests', :link => false, :test => true, :lint => true, :coverage => true
  package 'stx:goodies/petitparser/parsers/smalltalk/tests', :link => false, :test => true, :lint => true, :coverage => true
  package 'stx:goodies/petitparser/parsers/java', :link => false, :test => true, :lint => true, :coverage => true

end

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

  package 'exept:regression', :repository => :'swing:private:hg', :branch => 'jv', :test => true
  package 'stx:libview/tests', :test => true

  tasks do
    task :'test:pre' => BUILD_DIR / 'goodies' / 'CharacterEncoderCodeGenerator.st'

    file BUILD_DIR / 'goodies' / 'CharacterEncoderCodeGenerator.st' do
        checkout(:'exept:public', 'stx/goodies/CharacterEncoderCodeGenerator.st')
    end

    task :'test:post' do
      if not core_developer_machine?
        rm_rf BUILD_DIR / 'exept' / 'regression'
      end
    end
  end
end

project :'stx:goodies/refactoryBrowser/lint:reports' do
  import :'stx:jv-branch:for-reports-only'
  package "stx:goodies/refactoryBrowser/lint", :test => true, :lint =>  true
end

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

  # Manual checkouter, since libsvn2 is in libsvn repository...
  checkouter = Proc.new do | pkg, build_dir |
    base = project.repository(pkg.repository).url
    repo = 'stx/libsvn'
    wc = build_dir / pkg.directory
    FileUtils.mkdir_p(File.dirname(wc))
    if not system "svn co #{base}/#{repo}#{pkg.branch} #{wc}"
      error "Cannot checkout stx:libsvn2"
    end
  end

  package "stx:libsvn2",
    :repository => :swing,
    :branch => '/branches/libsvn2',
    :checkout => checkouter,
    :test => true, :lint => true, :link => false

  tasks do
    task 'stx:projects/smalltalk' => 'stx:libsvn2'
    task 'stx:libsvn2' => 'stx:libbasic'
  end

end

project :'jn:refactoring_custom:reports' do
  import :'stx:jv-branch:for-reports-only'

  repository :'bitbucket:jnesveda' do
    type :hg
    url "https://bitbucket.org/jnesveda"
    separator '-'
  end

  # Manual checkouter
  checkouter = Proc.new do | pkg, build_dir |
    base = project.repository(pkg.repository).url
    repo = 'refactoring_custom'
    wc = build_dir / pkg.directory
    FileUtils.mkdir_p(File.dirname(wc))
    if not system "hg clone #{base}/#{repo} #{wc}"
      error "Cannot checkout jn:refactoring_custom"
    end
  end


  package "jn:refactoring_custom",
    :repository => :'bitbucket:jnesveda', :test => true, :lint => true, :coverage => true, :link => false,   :checkout => checkouter

  tasks do
    task 'stx:projects/smalltalk' => 'jn:refactoring_custom'
    task 'jn:refactoring_custom' => 'stx:libbasic'
  end

end

project :'stx:goodies/smallsense:reports' do
  import :'stx:jv-branch:for-reports-only'
  package "stx:goodies/smallsense", :test => true, :lint => true, :coverage => true
end

project :'stx:goodies/sunit:reports' do
  import :'stx:jv-branch:for-reports-only'
  package "stx:goodies/sunit", :test => true, :lint => true, :coverage => true
end



project :'jv:calipel:s:reports' do
  import :'stx:jv-branch:for-reports-only'

  package 'jv:calipel', :repository => :'bitbucket:janvrany'
  package "jv:calipel/s", :link => false
  package "jv:calipel/s/stx", :link => false
  package "jv:calipel/s/tests", :test => true, :lint => true, :link => false

  tasks do
    task 'stx:projects/smalltalk' => 'jv:calipel/s'
    task 'stx:projects/smalltalk' => 'jv:calipel/s/stx'
    task 'jv:calipel/s' => 'stx:libbasic'
    task 'jv:calipel/s/stx' => 'stx:libbasic'
  end

end



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

  repository :swing
  package "stx:goodies/announcements"
  package "cvut:fel/perseus/core"
  package "cvut:fel/libutilui"
  package "cvut:fel/perseus/core_ui"
  package "stx:goodies/xmlsuite/core", :test => true, :lint =>  true
  package "stx:goodies/xmlsuite/xmlreaderimpl", :test => true, :lint =>  true
  package "stx:goodies/xmlsuite/xquery", :test => true, :lint =>  true

  tasks do
    task "stx:goodies/xmlsuite/xmlreaderimpl" => "stx:goodies/xmlsuite/core"
    task "stx:goodies/xmlsuite/xquery" => [ "stx:goodies/xmlsuite/core" , "cvut:fel/perseus/core_ui" ]
    task "stx:goodies/xmlsuite/core" => "cvut:fel/perseus/core"
    task "cvut:fel/perseus/core" => "stx:goodies/announcements"

    task 'stx:projects/smalltalk' => "stx:goodies/xmlsuite/core"
    task 'stx:projects/smalltalk' => "stx:goodies/xmlsuite/xmlreaderimpl"
    task 'stx:projects/smalltalk' => "stx:goodies/xmlsuite/xquery"

  end
end


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

  checkouter = Proc.new do | pkg, build_dir |
    base = project.repository(pkg.repository).url
    repo = 'stx/goodies/xtreams'
    repo_pkg = pkg.name[repo.size+1..pkg.name.size]
    wc = build_dir / pkg.directory
    url = "#{base}/#{repo}/#{pkg.branch || 'trunk'}/#{repo_pkg}"
    FileUtils.mkdir_p(File.dirname(wc))
    if not system "svn co #{url} #{wc}"
      error "Cannot checkout xtreams: #{url}"
    end
  end

  app_name "smalltalkx-jv-branch+xtreams"

  repository :'swing:hg'

  package "stx:goodies/xtreams"
  package "stx:goodies/xtreams/support", :lint => true, :link => false
  package "stx:goodies/xtreams/core", :lint => true, :link => false
  package "stx:goodies/xtreams/core/tests", :link => false
  package "stx:goodies/xtreams/substreams", :lint => true, :link => false
  package "stx:goodies/xtreams/substreams/tests", :link => false
  package "stx:goodies/xtreams/terminals", :lint => true, :link => false
  package "stx:goodies/xtreams/terminals/tests", :link => false
  package "stx:goodies/xtreams/transforms", :lint => true,  :link => false
  package "stx:goodies/xtreams/transforms/tests", :link => false

  tasks do
    # Dependencies
    task "stx:goodies/xtreams/support" => "stx:libbasic"
    task "stx:goodies/xtreams/core" => "stx:goodies/xtreams/support"
    task "stx:goodies/xtreams/substreams" => "stx:goodies/xtreams/core"
    task "stx:goodies/xtreams/terminals" => "stx:goodies/xtreams/core"
    task "stx:goodies/xtreams/transforms" => "stx:goodies/xtreams/core"

    # Link dependencies
    task 'stx:projects/smalltalk' => "stx:goodies/xtreams/core"
    task 'stx:projects/smalltalk' => "stx:goodies/xtreams/terminals"
    task 'stx:projects/smalltalk' => "stx:goodies/xtreams/substreams"
    task 'stx:projects/smalltalk' => "stx:goodies/xtreams/transforms"

    task :'dist:main' => :'dist:build-tree'

    task 'test:post' => [ 'stx:goodies/builder/reports', REPORT_DIR ] do
      app = project.application
      packages = [
        "stx:goodies/xtreams/support/tests" ,
        "stx:goodies/xtreams/core/tests" ,
        "stx:goodies/xtreams/substreams/tests" ,
        "stx:goodies/xtreams/terminals/tests" ,
        "stx:goodies/xtreams/transforms/tests" ,
      ]
      run_report(app, packages, 'Builder::TestReport')
    end


  end

end